コード例 #1
0
    public void ApplyBuff(Chr chrAlly)
    {
        //Make sure we are buffing an ally and not ourselves
        if (chrAlly == this.chrTarget)
        {
            return;
        }

        //Don't target dead characters
        if (chrAlly.bDead)
        {
            Debug.LogError("Attempting to buff a dead character - shouldn't have been supplied as an active character");
            return;
        }

        //So we're sure we're buffing a valid character at this point

        ContSkillEngine.Get().AddExec(new ExecApplySoulChr(chrSource, chrAlly,
                                                           new SoulChangePower(chrSource, chrAlly, skillSource, nPowerGain, 1)
        {
            //Set up the hidden soul effect that's buffing the ally's power
            bRemoveOnChrSourceDeath = true
        })
        {
            //Set up the properties of the soul application executable
            sLabel = chrAlly.sName + " is inspired by " + this.chrSource.sName
        });
    }
コード例 #2
0
    public override void OnEnter()
    {
        //First, increase the fatigue value of the character
        ContSkillEngine.Get().AddExec(new ExecChangeFatigue(null, chrOwner, nStunAmount, false));

        //Then, add a replacement effect to cancel out any further stuns that we would take
        repStun = new Replacement()
        {
            //The list of replacement effects we'll include ourselves in
            lstExecReplacements = ExecStun.lstAllFullReplacements,

            //Note that the parameter type is the generic Executable
            // - should cast to the proper type if further checking is required
            shouldReplace = (Executable exec) => {
                Debug.Assert(typeof(ExecStun) == exec.GetType());

                //replace only if the stunned character will be the character this effect is on
                return(((ExecStun)exec).chrTarget == this.chrOwner);
            },

            //Just replace the executable with a completely new null executable
            execReplace = (Executable exec) => new ExecNull(exec.chrSource)
        };

        //Register this replacement effect so that it will take effect
        Replacement.Register(repStun);

        //Let observers know to start paying attention to the fatigue value now
        // and to clear out any channeling time (if applicable)
        chrOwner.subFatigueChange.NotifyObs();
        chrOwner.subChannelTimeChange.NotifyObs();
    }
コード例 #3
0
 public override void Execute()
 {
     ContSkillEngine.PushSingleExecutable(new ExecRemoveSoulChr(skill.chrOwner, ((SkillSadism)skill).soulPassive)
     {
         sLabel = "removing sadism"
     });
 }
コード例 #4
0
    public override void UseSkill()
    {
        //Store the index of the current selections so that we can refer back to it later when the channel finishes (or triggers in some way)
        nSelectionsInputIndex = NetworkMatchReceiver.Get().indexCurMatchInput;

        ContSkillEngine.PushSingleClause(new ClauseBeginChannel(skill));
    }
コード例 #5
0
 public void cbOnEndTurn(Object target, object[] args)
 {
     ContSkillEngine.Get().AddExec(new ExecLoseLife(chrSource, chrTarget, nLifeLoss)
     {
         sLabel = "Get me a cleanser booster!"
     });
 }
コード例 #6
0
 public override void Execute()
 {
     ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, skill.chrOwner, ((SkillCheerleader)skill).soulPassive)
     {
         sLabel = skill.chrOwner.sName + " is one peppy boi"
     });
 }
コード例 #7
0
 public override void Execute()
 {
     ContSkillEngine.PushSingleExecutable(new ExecRemoveSoulChr(skill.chrOwner, ((SkillCheerleader)skill).soulPassive)
     {
         sLabel = skill.chrOwner.sName + " is no longer peppy"
     });
 }
コード例 #8
0
ファイル: SoulChr.cs プロジェクト: ConnorReedMacLeod/Capstone
    //Can subscribe with this if you want to remove the effect on a particular trigger (doesn't have any extra checks though)
    public void cbRemoveThis(Object target, params object[] args)
    {
        Debug.Log("Pushing executable to remove " + this.sName + " from " + chrTarget.sName + " since it's now on " + chrTarget.position.ToString());
        ContSkillEngine.PushSingleExecutable(new ExecRemoveSoulChr(chrSource, this));

        Debug.Log("Need to unsubscribe all active subscriptions since we're being removed");
    }
コード例 #9
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            //First, deal damage to all enemies
            List <Chr> lstChrEnemy = skill.chrOwner.plyrOwner.GetEnemyPlayer().GetActiveChrs();

            for (int i = 0; i < lstChrEnemy.Count; i++)
            {
                //For each enemy, deal our dmgEnemy to them
                ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, lstChrEnemy[i], dmgEnemy)
                {
                    sLabel = "WAAAAAAAHWAAHWAHHH"
                });
            }

            //Then damage each of our allies
            List <Chr> lstChrAlly = skill.chrOwner.plyrOwner.GetActiveChrs();

            for (int i = 0; i < lstChrAlly.Count; i++)
            {
                //For each ally, deal our dmgAlly to them
                ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, lstChrAlly[i], dmgAlly)
                {
                    sLabel = "Really, dude?"
                });
            }
        }
コード例 #10
0
 public override void ClauseEffect(InputSkillSelection selections)
 {
     ContSkillEngine.PushSingleExecutable(new ExecApplySoulPosition(skill.chrOwner, skill.chrOwner.position, new SoulPositionBunker(soulToCopy, skill.chrOwner.position))
     {
         sLabel = "Hunker down"
     });
 }
コード例 #11
0
    public override void ChangeChanneltime(int _nChange)
    {
        if (chrOwner.bDead)
        {
            Debug.Log("Tried to change channeltime, but " + chrOwner.sName + " is dead");
            return;
        }

        //We can actually reduce the channel time if we're in this state

        if (_nChange + nChannelTime < 0)
        {
            nChannelTime = 0;
        }
        else
        {
            nChannelTime += _nChange;
        }

        Debug.Log("Channel time changed to " + nChannelTime);
        //If, for any reason, we've now been put to 0 channeltime, then our channel completes
        // and we transition to the fatigued state
        if (nChannelTime == 0)
        {
            Debug.Log("Naturally completed the channel, so pushing ExecCompleteChannel");
            ContSkillEngine.Get().AddExec(new ExecCompleteChannel(null, chrOwner));
        }
    }
コード例 #12
0
 public void GainLife()
 {
     ContSkillEngine.Get().AddExec(new ExecHeal(chrTarget, chrTarget, heal)
     {
         arSoundEffects = new SoundEffect[] { new SoundEffect("PitBeast/sndSadism", 1.067f) },
         sLabel         = "ooh it hurts so good"
     });
 }
コード例 #13
0
 //Only want the damage to go off if the soul effect expires naturally
 public override void ExpirationEffect()
 {
     ContSkillEngine.Get().AddExec(new ExecDealDamage(chrSource, chrTarget, dmg)
     {
         arSoundEffects = new SoundEffect[] { new SoundEffect("Saiko/sndStickyBombDetonate", 3.1f) },
         sLabel         = "Ai-same-CRIER, aibu-save-LIAR"
     });
 }
コード例 #14
0
    public void OnMouseDown()
    {
        //Let the skill engine know that it can start the match
        ContSkillEngine.Get().StartMatchLoop();

        //disable ourselves since we're not needed anymore (and since we don't want to allow double-clicking)
        this.gameObject.SetActive(false);
    }
コード例 #15
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = (Chr)selections.lstSelections[1];

            ContSkillEngine.PushSingleExecutable(new ExecSwitchChar(skill.chrOwner, chrSelected, (chrTarget) => ContPositions.Get().GetInFrontPosition(chrTarget.position))
            {
                sLabel = "Hey, I caught one!"
            });
        }
コード例 #16
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = (Chr)selections.lstSelections[1];

            ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, chrSelected, dmg)
            {
                sLabel = "Gimme yer life-juice"
            });
        }
コード例 #17
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = (Chr)selections.lstSelections[1];

            //TODO - maybe add some sort of additional function that can be called exactly when the executable resolves to trigger additional effects
            //    e.g., here it could be a structure called Tracking where you call Tracking.BeforeEffect() to track the gamestate before the executable
            //          evaluates (this can store information, and then you call Tracking.AfterEffect() to
            ContSkillEngine.PushSingleExecutable(new ExecMoveChar(skill.chrOwner, chrSelected, (chrTarget) => ContPositions.Get().GetBehindPosition(chrTarget.position)));
        }
コード例 #18
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = skill.chrOwner;

            ContSkillEngine.PushSingleExecutable(new ExecLoseLife(skill.chrOwner, chrSelected, nLifeLoss)
            {
                sLabel = "It's going berserk"
            });
        }
コード例 #19
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = (Chr)selections.lstSelections[1];

            ContSkillEngine.PushSingleExecutable(new ExecHeal(skill.chrOwner, chrSelected, healing)
            {
                sLabel = "Drink my life-juice"
            });
        }
コード例 #20
0
    public void cbOnEndTurn(Object target, object[] args)
    {
        Debug.Log("We have been triggered at the end of turn to add a burn damage exec");

        ContSkillEngine.Get().AddExec(new ExecDealDamage(this.chrSource, this.chrTarget, new Damage(dmg))
        {
            sLabel = "Taking damage from Burn effect"
        });
    }
コード例 #21
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = (Chr)selections.lstSelections[1];

            ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, chrSelected, dmg)
            {
                arSoundEffects = new SoundEffect[] { new SoundEffect("PitBeast/sndTendrilStab", 3.067f) },
                sLabel         = "Stab, stab, stab"
            });
        }
コード例 #22
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = skill.chrOwner;

            ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, chrSelected, new SoulEvolved(soulToCopy, chrSelected))
            {
                arSoundEffects = new SoundEffect[] { new SoundEffect("PitBeast/sndForcedEvolution", 4.667f) },
                sLabel         = "It's evolving"
            });
        }
コード例 #23
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = skill.chrOwner;

            ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, chrSelected, new SoulSmokeCover(soulToCopy, chrSelected))
            {
                arSoundEffects = new SoundEffect[] { new SoundEffect("Saiko/sndSmokeCover", 4.3f) },
                sLabel         = "Disappearing into the shadows..."
            });
        }
コード例 #24
0
    public void GiveManaToAllPlayers()
    {
        //Give the mana to each player as specified by the ContManaDistributer
        for (int i = 0; i < Match.Get().nPlayers; i++)
        {
            Player plyrToGive = Match.Get().arPlayers[i];

            ContSkillEngine.Get().AddExec(new ExecChangeMana(null, plyrToGive, ContManaDistributer.Get().GetCurrentTurnStartManaForPlayer(plyrToGive)));
        }
    }
コード例 #25
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = (Chr)selections.lstSelections[1];

            ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, chrSelected, new SoulHunted(soulToCopy, chrSelected))
            {
                arSoundEffects = new SoundEffect[] { new SoundEffect("Fischer/sndHuntersQuarry", 0.867f) },
                sLabel         = "I'm gonna get ya"
            });
        }
コード例 #26
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = (Chr)selections.lstSelections[1];

            ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, chrSelected, new SoulCloudCushion(soulToCopy, chrSelected))
            {
                arSoundEffects = new SoundEffect[] { new SoundEffect("Rayne/sndCloudCushion", 3.467f) },
                sLabel         = "Ooh, so soft"
            });
        }
コード例 #27
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = skill.chrOwner;

            ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, chrSelected, new SoulFortissimo(soulToCopy, chrSelected))
            {
                arSoundEffects = new SoundEffect[] { new SoundEffect("Katarina/sndFortissimo", 6.2f) },
                sLabel         = "Let's do it louder this time"
            });
        }
コード例 #28
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = (Chr)selections.lstSelections[1];

            ContSkillEngine.PushSingleExecutable(new ExecStun(skill.chrOwner, chrSelected, nStunAmount)
            {
                arSoundEffects = new SoundEffect[] { new SoundEffect("Saiko/sndTranquilize", 1.4f) },
                sLabel         = "Shhh... Look at my daughter."
            });
        }
コード例 #29
0
        public override void ClauseEffect(InputSkillSelection selections)
        {
            Chr chrSelected = (Chr)selections.lstSelections[1];

            ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, chrSelected, dmg)
            {
                arSoundEffects = new SoundEffect[] { new SoundEffect("Fischer/sndHarpoonGun", 2.067f) },
                sLabel         = "Behold, the power of my stand, Beach Boy!"
            });
        }
コード例 #30
0
    public override void Recharge()
    {
        if (chrOwner.bDead)
        {
            Debug.Log("Tried to recharge, but " + chrOwner.sName + " is dead");
            return;
        }

        //If we're channeling, instead of reducing fatigue, we only reduce the channel time
        ContSkillEngine.Get().AddExec(new ExecChangeChannel(null, chrOwner, -1));
    }