Example #1
0
        //decrease time as effect has happened, and adjust the creatures health
        public override void doEffect(GenericPerson creature)
        {
            time--;
            int damage = bonus + amount;
            int burnt  = creature.hurt(damage);

            printInfo(creature, burnt);
        }
Example #2
0
 //create a strike class for the player
 public Strike(Player player)
 {
     spell  = null;
     melee  = null;
     ranged = null;
     thing  = player;
     getAttack();
 }
Example #3
0
        public override void doEffect(GenericPerson creature)
        {
            int healedAmount = creature.heal(amount);

            Constants.writeLine("DEBUG:: In EffectHeal, healedAmont == " + healedAmount);
            time--;

            printInfo(creature, healedAmount);
        }
Example #4
0
        public override void doEffect(GenericPerson creature)
        {
            int num = creature.hurt(amount + bonus);

            if (buff.isActive())
            {
                buff.doBuff(creature);
            }
            time--;
            printInfo(creature, num);
        }
Example #5
0
 protected void printInfo(GenericPerson creature, int num)
 {
     if (creature.GetType().IsSubclassOf(typeof(GenericCreature)))
     {//this is a creature
         printInfoCreature(creature, num);
     }
     else
     {//otherwise, it's the player
         printInfoPlayer(creature, num);
     }
 }
Example #6
0
 protected override void printInfoPlayer(GenericPerson player, int num)
 {
     Constants.writeLine("You have been healed for&4 " + num + " &15HP.");
 }
Example #7
0
 protected override void printInfoCreature(GenericPerson creature, int num)
 {
     Constants.writeLine(creature.getName() + " has been healed for&4 " + num + " &15HP.");
 }
Example #8
0
 public abstract void doBuff(GenericPerson person);
Example #9
0
 //create a strike class for a creature
 public Strike(GenericCreature creature)
 {
     thing = creature;
     getAttack();
 }
Example #10
0
 protected abstract void printInfoPlayer(GenericPerson player, int num);
Example #11
0
 protected abstract void printInfoCreature(GenericPerson creature, int num);
Example #12
0
 public abstract void doEffect(GenericPerson creature);
Example #13
0
 //"Freeze" the target, making them unable to move/ attack
 public override void doBuff(GenericPerson person)
 {
     person.attacked();//by doing this, it prevents this person from doing another attack
     time--;
 }