public override AbilityActivator Create(CombatController owner)
    {
        var ability = DesertContext.StrangeNew <MultiActivatorAbility>();

        ability.activators = abilityActivators.ConvertAll(a => a.Create(owner));
        return(ability);
    }
    public override AbilityActivator Create(CombatController owner)
    {
        var ability = DesertContext.StrangeNew <ShieldGeneratorAbility>();

        ability.shieldAmount = shieldAmount;
        return(ability);
    }
    public override Restriction Create(Character character)
    {
        var restriction = DesertContext.StrangeNew <HasXInitiativeRestriction>();

        restriction.initiativeRequriement = initiativeRequirement;
        return(restriction);
    }
Beispiel #4
0
    public override Cost Create(Character owner)
    {
        var cost = DesertContext.StrangeNew <ItemCost>();

        cost.item = item;
        return(cost);
    }
    public TravelingStory CreateSpecificStory(Vector2 position, TravelingStoryData data, TravelingStoryAIData aiOverride = null)
    {
        spriteToUse = data.art;

        var travelingStory = DesertContext.StrangeNew <TravelingStoryController>();

        travelingStory.PopupText = "<u>" + data.dataName + "</u>\n" + data.difficulty + " difficulty";
        travelingStory.action    = CreateAction(data);
        if (aiOverride != null)
        {
            travelingStory.ai = aiOverride.Create();
        }
        else
        {
            travelingStory.ai = data.ai.Create();
        }
        travelingStory.stealthRating = data.stealthRating;

        DesertContext.QuickBind <TravelingStoryMediated>(travelingStory);
        var travelingStoryGO = GameObject.Instantiate(PrefabGetter.travelingStoryPrefab, parent);

        DesertContext.FinishQuickBind <TravelingStoryMediated>();

        travelingStoryGO.GetComponent <TravelingStoryVisuals>().Setup(spriteToUse);
        travelingStory.TeleportToPosition(position);
        travelingStory.Setup();

        return(travelingStory);
    }
    TravelingStoryBeginCombatAction CreateCombatAction(TravelingStoryData data)
    {
        var combatAction = DesertContext.StrangeNew <TravelingStoryBeginCombatAction>();

        combatAction.combatData = data.combatData;
        return(combatAction);
    }
Beispiel #7
0
    public override StoryActionEvent Create()
    {
        var action = DesertContext.StrangeNew <CreateMapLocationEvent>();

        action.locationData = location;
        return(action);
    }
Beispiel #8
0
    public override Restriction Create(Character character)
    {
        var r = DesertContext.StrangeNew <ItemIsUnjammedRestriction>();

        r.item = item;
        return(r);
    }
Beispiel #9
0
    public override ItemEffect Create(Character character)
    {
        var itemEffect = DesertContext.StrangeNew <CreateMapAbilityButtonItemEffect>();

        itemEffect.mapAbility = mapAbility.Create(character);
        return(itemEffect);
    }
    public override void Apply(PlayerCharacter playerCharacter)
    {
        var gainer = DesertContext.StrangeNew <MapAbilityGainer>();

        gainer.mapAbility = mapAbility.Create(playerCharacter.GetCharacter());
        gainer.Apply();
    }
    public override StoryActionEvent Create()
    {
        var action = DesertContext.StrangeNew <StartStoryActionEvent>();

        action.story = storyData;
        return(action);
    }
Beispiel #12
0
    public override StoryActionEvent Create()
    {
        var e = DesertContext.StrangeNew <GainCoinsEvent>();

        e.coins = numCoins;
        return(e);
    }
Beispiel #13
0
    public override TravelingStoryAIRoutine Create()
    {
        var chase = DesertContext.StrangeNew <TravelingStoryChase>();

        chase.speed = this.speed;
        return(chase);
    }
Beispiel #14
0
    public override StoryActionEvent Create()
    {
        var e = DesertContext.StrangeNew <AllyStabilizationEvent>();

        e.stabilizes = stabilizes;
        return(e);
    }
    public override StoryActionEvent Create()
    {
        var e = DesertContext.StrangeNew <AdvanceDaysEvent>();

        e.daysToAdvance = daysToPass;
        return(e);
    }
Beispiel #16
0
    public override Restriction Create(Character character)
    {
        var r = DesertContext.StrangeNew <HasJammedGunRestriction>();

        r.allowsJamChecks = allowsJamChecks;
        return(r);
    }
Beispiel #17
0
    public override ItemEffect Create(Character character)
    {
        var itemEffect = DesertContext.StrangeNew <CreateCombatAbilityButtonItemEffect>();

        itemEffect.ability = ability;
        return(itemEffect);
    }
Beispiel #18
0
    public override void Apply(PlayerCharacter playerCharacter)
    {
        var increaser = DesertContext.StrangeNew <JamSavesIncreaser>();

        increaser.increaseAmount = jamSavesGained;
        increaser.Run();
    }
Beispiel #19
0
    void BuildBasics()
    {
        playerCharacter = DesertContext.StrangeNew <Character>();

        var baseStats = BasePlayerCharacterStats.Instance;

        SetArt(baseStats.baseArt);
        playerCharacter.Setup(baseStats.maxHP);
        playerCharacter.attackModule  = CreateAttackModule(baseStats);
        playerCharacter.defenseModule = CreateDefenseModule(baseStats);
        playerCharacter.speed         = baseStats.baseInitiative;
        playerCharacter.myFaction     = Faction.Player;
        playerCharacter.displayName   = "PLAYA";

        combatPlayerAbilities.Clear();
        combatPlayerAbilities.Add(CombatReferences.Get().emptyAbility);
        combatPlayerAbilityModifiers.Clear();
        ambushPlayerAbilities.Clear();
        ambushPlayerAbilities.Add(CombatReferences.Get().emptyAbility);
        baseStats.defaultAbilities.ForEach(a => AddCombatPlayerAbility(a));
        baseStats.defaultAbilityModifiers.ForEach(m => AddCombatPlayerAbilityModifier(m));
        baseStats.defaultAmbushAbilities.ForEach(a => AddAmbushAbility(a));

        baseStats.autoEquippedItems.ForEach(i => {
            var item = i.Create(playerCharacter);
            inventory.AddItem(item);
            item.Equip(playerCharacter);
        });
    }
    TravelingStoryBeginStoryAction CreateStoryAction(TravelingStoryData data)
    {
        var storyAction = DesertContext.StrangeNew <TravelingStoryBeginStoryAction>();

        storyAction.story = data.story;
        return(storyAction);
    }
    public override TownBenefit Create(Town town)
    {
        var benefit = DesertContext.StrangeNew <TownGainsStatusEffectBenefit>();

        benefit.statusEffect = statusEffect.Create(town);
        return(benefit);
    }
    public override MapAbilityActivator Create()
    {
        var activator = DesertContext.StrangeNew <MapAbilityStartStoryActivator>();

        activator.story = story;
        return(activator);
    }
Beispiel #23
0
    public override TravelingStoryAIRoutine Create()
    {
        var flee = DesertContext.StrangeNew <TravelingStoryFlee>();

        flee.speed = this.speed;
        return(flee);
    }
    public override TravelingStoryAIRoutine Create()
    {
        var ai = DesertContext.StrangeNew <TravelingStoryWander>();

        ai.distanceToWander = distanceToWander;
        ai.speed            = speed;
        return(ai);
    }
Beispiel #25
0
    public override AbilityTargetPicker Create(Character owner)
    {
        var inputPicker = DesertContext.StrangeNew <MultiTargetPicker>();

        inputPicker.filters = filters.ConvertAll(fd => fd.Create(owner));

        return(inputPicker);
    }
    public override void Apply(PlayerCharacter plapyerCharacter)
    {
        var increaser = DesertContext.StrangeNew <EffortPoolIncreaser>();

        increaser.type   = type;
        increaser.amount = amount;
        increaser.Run();
    }
Beispiel #27
0
    CombatController CreateCombatController(GameObject go)
    {
        var aiController = DesertContext.StrangeNew <CombatController>();

        aiController.artGO = go;

        return(aiController);
    }
    public override AbilityActivator Create(CombatController owner)
    {
        var a = DesertContext.StrangeNew <JamItemAbilityActivator>();

        a.item      = item;
        a.character = owner.character;
        return(a);
    }
Beispiel #29
0
    public override StoryActionEvent Create()
    {
        var e = DesertContext.StrangeNew <ChangeItemsEvent>();

        e.item           = item;
        e.quantityChange = quantityChange;
        return(e);
    }
    public override TownBenefit Create(Town town)
    {
        var benefit = DesertContext.StrangeNew <TownGainsPoliticalReputationBenefit>();

        benefit.amount = amount;
        benefit.town   = town;
        return(benefit);
    }