diff --git a/app/sdk/achievements/achievementsFactory.coffee b/app/sdk/achievements/achievementsFactory.coffee index 8d6511ba6..f9b847aae 100644 --- a/app/sdk/achievements/achievementsFactory.coffee +++ b/app/sdk/achievements/achievementsFactory.coffee @@ -65,6 +65,7 @@ ThanksgivingLoginAchievement = require './loginBasedAchievements/thanksgivingLog ChristmasLoginAchievement = require './loginBasedAchievements/christmasLoginAchievement.coffee' NewPlayerGoldLoginAchievement = require './loginBasedAchievements/newPlayerGoldLoginAchievement.coffee' NewPlayerSpiritLoginAchievement = require './loginBasedAchievements/newPlayerSpiritLoginAchievement.coffee' +NewPlayerCardsLoginAchievement = require './loginBasedAchievements/newPlayerCardsLoginAchievement.coffee' # Wartech general achievements WartechGeneralFaction1Achievement = require './wartechAchievements/wartechGeneralFaction1Achievement' @@ -151,6 +152,7 @@ class AchievementsFactory @_achievementsCache[ChristmasLoginAchievement.id] = ChristmasLoginAchievement @_achievementsCache[NewPlayerGoldLoginAchievement.id] = NewPlayerGoldLoginAchievement @_achievementsCache[NewPlayerSpiritLoginAchievement.id] = NewPlayerSpiritLoginAchievement + @_achievementsCache[NewPlayerCardsLoginAchievement.id] = NewPlayerCardsLoginAchievement # wartech @_achievementsCache[WartechGeneralFaction1Achievement.id] = WartechGeneralFaction1Achievement @_achievementsCache[WartechGeneralFaction2Achievement.id] = WartechGeneralFaction2Achievement @@ -167,8 +169,6 @@ class AchievementsFactory @_achievementsCache[MythronOrb6Achievement.id] = MythronOrb6Achievement @_achievementsCache[MythronOrb7Achievement.id] = MythronOrb7Achievement - - # store the enabled achievements @_enabledAchievementsCache = {} for k,v of @_achievementsCache diff --git a/app/sdk/achievements/loginBasedAchievements/newPlayerCardsLoginAchievement.coffee b/app/sdk/achievements/loginBasedAchievements/newPlayerCardsLoginAchievement.coffee new file mode 100644 index 000000000..5646ed9b1 --- /dev/null +++ b/app/sdk/achievements/loginBasedAchievements/newPlayerCardsLoginAchievement.coffee @@ -0,0 +1,22 @@ +Achievement = require 'app/sdk/achievements/achievement' +moment = require 'moment' +GiftCrateLookup = require 'app/sdk/giftCrates/giftCrateLookup' + +# This achievement exists so we can give new players a head start on their collection. +class NewPlayerCardsLoginAchievement extends Achievement + @id: "newPlayerCardsLoginAchievement" + @title: "Welcome to Duelyst!" + @description: "Open this crate to receive a complete card collection! If the client freezes, reload the page." + @progressRequired: 1 + @rewards: + giftChests: [GiftCrateLookup.FullCollection] + + @enabled: true + + @progressForLoggingIn: (currentLoginMoment) -> + return 1 + + @getLoginAchievementStartsMoment: () -> + return moment.utc("2022-10-28T00:00-00:00") + +module.exports = NewPlayerCardsLoginAchievement diff --git a/app/sdk/cards/cardSetLookup.coffee b/app/sdk/cards/cardSetLookup.coffee index 8eae313d7..de79c9ea5 100644 --- a/app/sdk/cards/cardSetLookup.coffee +++ b/app/sdk/cards/cardSetLookup.coffee @@ -1,7 +1,5 @@ class CardSet - @GauntletSpecial: -1 - @Core: 1 @Shimzar: 2 @Bloodborn: 3 diff --git a/app/sdk/cards/factory/core/faction1.coffee b/app/sdk/cards/factory/core/faction1.coffee index de38c4e55..14857cd40 100644 --- a/app/sdk/cards/factory/core/faction1.coffee +++ b/app/sdk/cards/factory/core/faction1.coffee @@ -121,7 +121,7 @@ class CardFactory_CoreSet_Faction1 if (identifier == Cards.Faction1.AltGeneral) card = new Unit(gameSession) - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.setIsGeneral(true) card.factionId = Factions.Faction1 card.name = i18next.t("cards.faction_1_unit_ziran_name") @@ -165,8 +165,8 @@ class CardFactory_CoreSet_Faction1 if (identifier == Cards.Faction1.ThirdGeneral) card = new Unit(gameSession) card.setIsGeneral(true) - card.setIsUnlockableWithAchievement(true) - card.setIsUnlockedWithAchievementId(WartechGeneralFaction1Achievement.id) + #card.setIsUnlockableWithAchievement(true) + #card.setIsUnlockedWithAchievementId(WartechGeneralFaction1Achievement.id) card.factionId = Factions.Faction1 card.name = i18next.t("cards.faction_1_unit_brome_name") card.setDescription(i18next.t("cards.faction_1_unit_brome_desc")) @@ -301,7 +301,7 @@ class CardFactory_CoreSet_Faction1 if (identifier == Cards.Faction1.SilverguardKnight) card = new Unit(gameSession) card.factionId = Factions.Faction1 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.name = i18next.t("cards.faction_1_unit_silverguard_knight_name") card.setBoundingBoxWidth(100) card.setBoundingBoxHeight(80) @@ -804,7 +804,7 @@ class CardFactory_CoreSet_Faction1 if (identifier == Cards.Spell.Tempest) card = new SpellDamage(gameSession) card.factionId = Factions.Faction1 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.Tempest card.name = i18next.t("cards.faction_1_spell_tempest_name") card.setDescription(i18next.t("cards.faction_1_spell_tempest_description")) @@ -889,7 +889,7 @@ class CardFactory_CoreSet_Faction1 if (identifier == Cards.Spell.Martyrdom) card = new SpellMartyrdom(gameSession) card.factionId = Factions.Faction1 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.Martyrdom card.name = i18next.t("cards.faction_1_spell_martyrdom_name") card.setDescription(i18next.t("cards.faction_1_spell_martyrdom_description")) @@ -1049,7 +1049,7 @@ class CardFactory_CoreSet_Faction1 if (identifier == Cards.Spell.DivineBond) card = new SpellBuffAttributeByOtherAttribute(gameSession) card.factionId = Factions.Faction1 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.DivineBond card.name = i18next.t("cards.faction_1_spell_divine_bond_name") card.setDescription(i18next.t("cards.faction_1_spell_divine_bond_description")) diff --git a/app/sdk/cards/factory/core/faction2.coffee b/app/sdk/cards/factory/core/faction2.coffee index 5ee8c37ba..992412ee3 100644 --- a/app/sdk/cards/factory/core/faction2.coffee +++ b/app/sdk/cards/factory/core/faction2.coffee @@ -127,7 +127,7 @@ class CardFactory_CoreSet_Faction2 if (identifier == Cards.Faction2.AltGeneral) card = new Unit(gameSession) - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.setIsGeneral(true) card.factionId = Factions.Faction2 card.name = i18next.t("cards.faction_2_unit_reva_name") @@ -171,8 +171,8 @@ class CardFactory_CoreSet_Faction2 if (identifier == Cards.Faction2.ThirdGeneral) card = new Unit(gameSession) card.setIsGeneral(true) - card.setIsUnlockableWithAchievement(true) - card.setIsUnlockedWithAchievementId(WartechGeneralFaction2Achievement.id) + #card.setIsUnlockableWithAchievement(true) + #card.setIsUnlockedWithAchievementId(WartechGeneralFaction2Achievement.id) card.factionId = Factions.Faction2 card.name = i18next.t("cards.faction_2_unit_shidai_name") card.setDescription(i18next.t("cards.faction_2_unit_shidai_desc")) @@ -516,7 +516,7 @@ class CardFactory_CoreSet_Faction2 card = new Unit(gameSession) card.factionId = Factions.Faction2 card.raceId = Races.Arcanyst - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.name = i18next.t("cards.faction_2_unit_chakri_avatar_name") card.setFXResource(["FX.Cards.Faction2.ChakriAvatar"]) card.setBaseSoundResource( @@ -873,7 +873,7 @@ class CardFactory_CoreSet_Faction2 if (identifier == Cards.Spell.SaberspineSeal) card = new SpellApplyModifiers(gameSession) card.factionId = Factions.Faction2 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.SaberspineSeal card.name = i18next.t("cards.faction_2_spell_saberspine_seal_name") card.setDescription(i18next.t("cards.faction_2_spell_saberspine_seal_description")) @@ -1045,7 +1045,7 @@ class CardFactory_CoreSet_Faction2 if (identifier == Cards.Spell.InnerFocus) card = new SpellInnerFocus(gameSession) card.factionId = Factions.Faction2 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.InnerFocus card.name = i18next.t("cards.faction_2_spell_inner_focus_name") card.setDescription(i18next.t("cards.faction_2_spell_inner_focus_description")) @@ -1084,7 +1084,7 @@ class CardFactory_CoreSet_Faction2 if (identifier == Cards.Spell.GhostLightning) card = new SpellDamage(gameSession) card.factionId = Factions.Faction2 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.GhostLightning card.name = i18next.t("cards.faction_2_spell_ghost_lightning_name") card.setDescription(i18next.t("cards.faction_2_spell_ghost_lightning_description")) diff --git a/app/sdk/cards/factory/core/faction3.coffee b/app/sdk/cards/factory/core/faction3.coffee index 3009b9436..e23bf60cc 100644 --- a/app/sdk/cards/factory/core/faction3.coffee +++ b/app/sdk/cards/factory/core/faction3.coffee @@ -122,7 +122,7 @@ class CardFactory_CoreSet_Faction3 if (identifier == Cards.Faction3.AltGeneral) card = new Unit(gameSession) - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.setIsGeneral(true) card.factionId = Factions.Faction3 card.name = i18next.t("cards.faction_3_unit_sajj_name") @@ -166,8 +166,8 @@ class CardFactory_CoreSet_Faction3 if (identifier == Cards.Faction3.ThirdGeneral) card = new Unit(gameSession) card.setIsGeneral(true) - card.setIsUnlockableWithAchievement(true) - card.setIsUnlockedWithAchievementId(WartechGeneralFaction3Achievement.id) + #card.setIsUnlockableWithAchievement(true) + #card.setIsUnlockedWithAchievementId(WartechGeneralFaction3Achievement.id) card.factionId = Factions.Faction3 card.name = i18next.t("cards.faction_3_unit_ciphyron_name") card.setDescription(i18next.t("cards.faction_3_unit_ciphyron_desc")) @@ -409,7 +409,7 @@ class CardFactory_CoreSet_Faction3 if (identifier == Cards.Faction3.BrazierRedSand) card = new Unit(gameSession) card.factionId = Factions.Faction3 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.name = i18next.t("cards.faction_3_unit_ethereal_obelysk_name") card.setDescription(i18next.t("cards.faction_3_unit_ethereal_obelysk_desc")) card.raceId = Races.Structure @@ -876,7 +876,7 @@ class CardFactory_CoreSet_Faction3 if (identifier == Cards.Spell.CosmicFlesh) card = new SpellApplyModifiers(gameSession) card.factionId = Factions.Faction3 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.CosmicFlesh card.name = i18next.t("cards.faction_3_spell_cosmic_flesh_name") card.setDescription(i18next.t("cards.faction_3_spell_cosmic_flesh_description")) @@ -902,7 +902,7 @@ class CardFactory_CoreSet_Faction3 if (identifier == Cards.Spell.Blindscorch) card = new SpellApplyModifiers(gameSession) card.factionId = Factions.Faction3 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.Blindscorch card.name = i18next.t("cards.faction_3_spell_blindscorch_name") card.setDescription(i18next.t("cards.faction_3_spell_blindscorch_description")) @@ -1054,7 +1054,7 @@ class CardFactory_CoreSet_Faction3 if (identifier == Cards.Spell.ScionsSecondWish) card = new SpellApplyModifiers(gameSession) card.factionId = Factions.Faction3 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.ScionsSecondWish card.name = i18next.t("cards.faction_3_spell_scions_second_wish_name") card.setDescription(i18next.t("cards.faction_3_spell_scions_second_wish_description")) diff --git a/app/sdk/cards/factory/core/faction4.coffee b/app/sdk/cards/factory/core/faction4.coffee index f553aae5e..7005eeef5 100644 --- a/app/sdk/cards/factory/core/faction4.coffee +++ b/app/sdk/cards/factory/core/faction4.coffee @@ -128,7 +128,7 @@ class CardFactory_CoreSet_Faction4 if (identifier == Cards.Faction4.AltGeneral) card = new Unit(gameSession) - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.setIsGeneral(true) card.factionId = Factions.Faction4 card.name = i18next.t("cards.faction_4_unit_cassyva_name") @@ -172,8 +172,8 @@ class CardFactory_CoreSet_Faction4 if (identifier == Cards.Faction4.ThirdGeneral) card = new Unit(gameSession) card.setIsGeneral(true) - card.setIsUnlockableWithAchievement(true) - card.setIsUnlockedWithAchievementId(WartechGeneralFaction4Achievement.id) + #card.setIsUnlockableWithAchievement(true) + #card.setIsUnlockedWithAchievementId(WartechGeneralFaction4Achievement.id) card.factionId = Factions.Faction4 card.name = i18next.t("cards.faction_4_unit_maehv_name") card.setDescription(i18next.t("cards.faction_4_unit_maehv_desc")) @@ -216,7 +216,7 @@ class CardFactory_CoreSet_Faction4 if (identifier == Cards.Faction4.AbyssalCrawler) card = new Unit(gameSession) card.factionId = Factions.Faction4 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.name = i18next.t("cards.faction_4_unit_abyssal_crawler_name") card.setDescription(i18next.t("cards.faction_4_unit_abyssal_crawler_desc")) card.setFXResource(["FX.Cards.Faction4.AbyssalCrawler"]) @@ -856,7 +856,7 @@ class CardFactory_CoreSet_Faction4 if (identifier == Cards.Spell.DaemonicLure) card = new SpellDamage(gameSession) card.factionId = Factions.Faction4 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.DaemonicLure card.name = i18next.t("cards.faction_4_spell_daemonic_lure_name") card.setDescription(i18next.t("cards.faction_4_spell_daemonic_lure_description")) @@ -896,7 +896,7 @@ class CardFactory_CoreSet_Faction4 if (identifier == Cards.Spell.ShadowNova) card = new SpellChokingShadows(gameSession) card.factionId = Factions.Faction4 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.ShadowNova card.name = i18next.t("cards.faction_4_spell_shadow_nova_name") card.setDescription(i18next.t("cards.faction_4_spell_shadow_nova_description")) @@ -1115,7 +1115,7 @@ class CardFactory_CoreSet_Faction4 if (identifier == Cards.Spell.SoulshatterPact) card = new SpellApplyModifiers(gameSession) card.factionId = Factions.Faction4 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.SoulshatterPact card.name = i18next.t("cards.faction_4_spell_soulshatter_pact_name") card.setDescription(i18next.t("cards.faction_4_spell_soulshatter_pact_description")) diff --git a/app/sdk/cards/factory/core/faction5.coffee b/app/sdk/cards/factory/core/faction5.coffee index 49a44c811..eb9593116 100644 --- a/app/sdk/cards/factory/core/faction5.coffee +++ b/app/sdk/cards/factory/core/faction5.coffee @@ -127,7 +127,7 @@ class CardFactory_CoreSet_Faction5 if (identifier == Cards.Faction5.AltGeneral) card = new Unit(gameSession) - card.setIsUnlockableBasic(true) + ##card.setIsUnlockableBasic(true) card.setIsGeneral(true) card.factionId = Factions.Faction5 card.name = i18next.t("cards.faction_5_unit_starhorn_name") @@ -171,8 +171,8 @@ class CardFactory_CoreSet_Faction5 if (identifier == Cards.Faction5.ThirdGeneral) card = new Unit(gameSession) card.setIsGeneral(true) - card.setIsUnlockableWithAchievement(true) - card.setIsUnlockedWithAchievementId(WartechGeneralFaction5Achievement.id) + #card.setIsUnlockableWithAchievement(true) + #card.setIsUnlockedWithAchievementId(WartechGeneralFaction5Achievement.id) card.factionId = Factions.Faction5 card.name = i18next.t("cards.faction_5_unit_ragnora_name") card.setDescription(i18next.t("cards.faction_5_unit_ragnora_desc")) @@ -471,7 +471,7 @@ class CardFactory_CoreSet_Faction5 if (identifier == Cards.Faction5.PrimordialGazer) card = new Unit(gameSession) card.factionId = Factions.Faction5 - card.setIsUnlockableBasic(true) + ##card.setIsUnlockableBasic(true) card.name = i18next.t("cards.faction_5_unit_primordial_gazer_name") card.setDescription(i18next.t("cards.faction_5_unit_primordial_gazer_desc")) card.setFXResource(["FX.Cards.Faction5.PrimordialGazer"]) @@ -865,7 +865,7 @@ class CardFactory_CoreSet_Faction5 if (identifier == Cards.Spell.DampeningWave) card = new SpellApplyModifiers(gameSession) card.factionId = Factions.Faction5 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.DampeningWave card.name = i18next.t("cards.faction_5_spell_dampening_wave_name") card.setDescription(i18next.t("cards.faction_5_spell_dampening_wave_description")) @@ -950,7 +950,7 @@ class CardFactory_CoreSet_Faction5 if (identifier == Cards.Spell.DanceOfDreams) card = new SpellApplyPlayerModifiers(gameSession) card.factionId = Factions.Faction5 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.DanceOfDreams card.name = i18next.t("cards.faction_5_spell_dance_of_dreams_name") card.setDescription(i18next.t("cards.faction_5_spell_dance_of_dreams_description")) @@ -1082,7 +1082,7 @@ class CardFactory_CoreSet_Faction5 if (identifier == Cards.Spell.PlasmaStorm) card = new SpellLavastorm(gameSession) card.factionId = Factions.Faction5 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.PlasmaStorm card.name = i18next.t("cards.faction_5_spell_plasma_storm_name") card.setDescription(i18next.t("cards.faction_5_spell_plasma_storm_description")) diff --git a/app/sdk/cards/factory/core/faction6.coffee b/app/sdk/cards/factory/core/faction6.coffee index 7b819cb34..01745def7 100644 --- a/app/sdk/cards/factory/core/faction6.coffee +++ b/app/sdk/cards/factory/core/faction6.coffee @@ -129,7 +129,7 @@ class CardFactory_CoreSet_Faction6 if (identifier == Cards.Faction6.AltGeneral) card = new Unit(gameSession) - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.setIsGeneral(true) card.factionId = Factions.Faction6 card.name = i18next.t("cards.faction_6_unit_kara_name") @@ -173,8 +173,8 @@ class CardFactory_CoreSet_Faction6 if (identifier == Cards.Faction6.ThirdGeneral) card = new Unit(gameSession) card.setIsGeneral(true) - card.setIsUnlockableWithAchievement(true) - card.setIsUnlockedWithAchievementId(WartechGeneralFaction6Achievement.id) + #card.setIsUnlockableWithAchievement(true) + #card.setIsUnlockedWithAchievementId(WartechGeneralFaction6Achievement.id) card.factionId = Factions.Faction6 card.name = i18next.t("cards.faction_6_unit_ilena_name") card.setDescription(i18next.t("cards.faction_6_unit_ilena_desc")) @@ -218,7 +218,7 @@ class CardFactory_CoreSet_Faction6 if (identifier == Cards.Faction6.FenrirWarmaster) card = new Unit(gameSession) card.factionId = Factions.Faction6 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.name = i18next.t("cards.faction_6_unit_fenrir_warmaster_name") card.setDescription(i18next.t("cards.faction_6_unit_fenrir_warmaster_desc")) card.setFXResource(["FX.Cards.Faction6.FenrirWarmaster"]) @@ -1165,7 +1165,7 @@ class CardFactory_CoreSet_Faction6 if (identifier == Cards.Spell.ChromaticCold) card = new SpellChromaticCold(gameSession) card.factionId = Factions.Faction6 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.ChromaticCold card.name = i18next.t("cards.faction_6_spell_chromatic_cold_name") card.setDescription(i18next.t("cards.faction_6_spell_chromatic_cold_description")) @@ -1226,7 +1226,7 @@ class CardFactory_CoreSet_Faction6 if (identifier == Cards.Spell.Avalanche) card = new SpellAvalanche(gameSession) card.factionId = Factions.Faction6 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.Avalanche card.name = i18next.t("cards.faction_6_spell_avalanche_name") card.setDescription(i18next.t("cards.faction_6_spell_avalanche_description")) @@ -1328,7 +1328,7 @@ class CardFactory_CoreSet_Faction6 if (identifier == Cards.Spell.AspectOfTheWolf) card = new SpellAspectBase(gameSession) card.factionId = Factions.Faction6 - card.setIsUnlockableBasic(true) + #card.setIsUnlockableBasic(true) card.id = Cards.Spell.AspectOfTheWolf card.name = i18next.t("cards.faction_6_spell_aspect_of_the_fox_name") card.setDescription(i18next.t("cards.faction_6_spell_aspect_of_the_fox_description")) diff --git a/app/sdk/giftCrates/giftCrateFactory.coffee b/app/sdk/giftCrates/giftCrateFactory.coffee index 70157ec0c..e2c1f8b76 100644 --- a/app/sdk/giftCrates/giftCrateFactory.coffee +++ b/app/sdk/giftCrates/giftCrateFactory.coffee @@ -1,4 +1,5 @@ Logger = require 'app/common/logger' +SDK = require '../../sdk' # regex requires into cache generation code with the following # find: ([A-z]+) = ([ \S])*[\n]* @@ -14,7 +15,6 @@ _ = require 'underscore' moment = require 'moment' class GiftCrateFactory - @_giftCrateTemplateCache: null @_generateCache:()-> @@ -214,6 +214,21 @@ class GiftCrateFactory card_ids: [Cards.Neutral.SarlacTheEternal,Cards.Neutral.BlackLocust] gold: 100 cosmetics: [CosmeticsLookup.Emote.Faction1Taunt] + + # Full Collection gift crate + allCardIds = SDK.GameSession.getCardCaches().getIsCollectible(true).getIsPrismatic(false).getIsSkinned(false).getCards().map (card) -> return card.id + completeCollection = [] + for id in allCardIds + # Include three copies of all non-prismatic, non-skinned cards. + completeCollection.push(id) + completeCollection.push(id) + completeCollection.push(id) + @_giftCrateTemplateCache[GiftCrateLookup.FullCollection] = + titleText: "Full Collection" + subtitleText: "___" + availableAt: moment.utc().startOf('year').year(2022).valueOf() + rewards: + card_ids: completeCollection @getIsCrateTypeAvailable: (crateType,systemTime) -> MOMENT_NOW_UTC = moment(systemTime) || moment().utc() diff --git a/app/sdk/giftCrates/giftCrateLookup.coffee b/app/sdk/giftCrates/giftCrateLookup.coffee index 356a66e27..4fbb925fc 100644 --- a/app/sdk/giftCrates/giftCrateLookup.coffee +++ b/app/sdk/giftCrates/giftCrateLookup.coffee @@ -21,6 +21,7 @@ class GiftCrateLookup @HalloweenLogin: "HalloweenLogin" @ThanksgivingLogin: "ThanksgivingLogin" @ChristmasLogin: "ChristmasLogin" + @FullCollection: "FullCollection" # Test @Unavailable2050: "Unavailable2050" diff --git a/app/ui/managers/progression_manager.js b/app/ui/managers/progression_manager.js index 3d2d52306..82231d23a 100644 --- a/app/ui/managers/progression_manager.js +++ b/app/ui/managers/progression_manager.js @@ -161,12 +161,16 @@ var ProgressionManager = Manager.extend({ }, isFactionUnlocked: function (factionId) { + // As of Dec 2022, all factions are always unlocked. + return true; + /* // Lyonar and Neutral always unlocked if (factionId == SDK.Factions.Faction1 || factionId == SDK.Factions.Neutral) { return true; } var progressionStatsModel = this.getFactionProgressionStatsModel(factionId); return (progressionStatsModel != null && progressionStatsModel.get('xp') != null); + */ }, isFactionUnlockedOrCardsOwned: function (factionId) { diff --git a/test/unit/sdk/progression/faction_factory.js b/test/unit/sdk/progression/faction_factory.js index dc197dc18..39d7d0519 100644 --- a/test/unit/sdk/progression/faction_factory.js +++ b/test/unit/sdk/progression/faction_factory.js @@ -33,6 +33,7 @@ describe('faction progression', () => { expect(SDK.FactionFactory.starterDeckForFactionLevel(SDK.Factions.Faction1, 9).length).to.equal(40); }); + /* Test disabled: Basics are no longer unlockable. it('expect 12 total unlockable basic cards in starter deck at level 9', () => { let unlockableBasicCount = 0; const deck = SDK.FactionFactory.starterDeckForFactionLevel(SDK.Factions.Faction1, 9); @@ -42,8 +43,8 @@ describe('faction progression', () => { const sdkCard = SDK.CardFactory.cardForIdentifier(cardId, SDK.GameSession.current()); if (sdkCard.getIsUnlockableBasic()) unlockableBasicCount++; } - expect(unlockableBasicCount).to.equal(12); }); + */ }); });