コード例 #1
0
 void ThornsI(Fighter attacker, Fighter victim, float damage)
 {
     Deal(attacker, 1);
 }
コード例 #2
0
 void DoublingII(Fighter attacker, Fighter victim, float damage)
 {
     Deal(victim, 2);
 }
コード例 #3
0
        /*
         *  Applies offensive and defensive effects
         */
        void ApplyEffect(Fighter attacker, Fighter victim, Effect effect, int strength, float damage)
        {
            switch (effect)
            {
            case Effect.ABSORB:
                switch (strength)
                {
                /*
                 *  Absorb makes you take less damage
                 */
                case 1:
                    AbsorbI(attacker, victim, damage);
                    break;

                case 2:
                    break;

                case 3:
                    break;

                case 4:
                    break;

                case 5:
                    break;
                }
                break;

            case Effect.THORNS:
                switch (strength)
                {
                /*
                 *  Thorns does retributal damage to the attacker
                 */
                case 1:
                    ThornsI(attacker, victim, damage);
                    break;

                case 2:
                    break;

                case 3:
                    break;

                case 4:
                    break;

                case 5:
                    break;
                }
                break;

            case Effect.SPLINTER:
                switch (strength)
                {
                /*
                 *  Splinter does a piercing attack with 1/4 of your damage to adjacent enemies
                 */
                case 1:
                    SplinterI(attacker, victim, damage);
                    break;

                case 2:
                    SplinterII(attacker, victim, damage);
                    break;

                case 3:
                    break;

                case 4:
                    break;

                case 5:
                    break;
                }
                break;

            case Effect.DOUBLING:
                switch (strength)
                {
                /*
                 *  Double Damage
                 */
                case 1:
                    DoublingI(attacker, victim, damage);
                    break;

                case 2:
                    DoublingII(attacker, victim, damage);
                    break;

                case 3:
                    break;

                case 4:
                    break;

                case 5:
                    break;
                }
                break;
            }
        }