Beispiel #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);
        }
Beispiel #2
0
 //create a strike class for the player
 public Strike(Player player)
 {
     spell  = null;
     melee  = null;
     ranged = null;
     thing  = player;
     getAttack();
 }
Beispiel #3
0
        public override void doEffect(GenericPerson creature)
        {
            int healedAmount = creature.heal(amount);

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

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

            if (buff.isActive())
            {
                buff.doBuff(creature);
            }
            time--;
            printInfo(creature, num);
        }
Beispiel #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);
     }
 }
Beispiel #6
0
 protected override void printInfoPlayer(GenericPerson player, int num)
 {
     Constants.writeLine("You have been healed for&4 " + num + " &15HP.");
 }
Beispiel #7
0
 protected override void printInfoCreature(GenericPerson creature, int num)
 {
     Constants.writeLine(creature.getName() + " has been healed for&4 " + num + " &15HP.");
 }
Beispiel #8
0
 public abstract void doBuff(GenericPerson person);
Beispiel #9
0
 //create a strike class for a creature
 public Strike(GenericCreature creature)
 {
     thing = creature;
     getAttack();
 }
Beispiel #10
0
 protected abstract void printInfoPlayer(GenericPerson player, int num);
Beispiel #11
0
 protected abstract void printInfoCreature(GenericPerson creature, int num);
Beispiel #12
0
 public abstract void doEffect(GenericPerson creature);
Beispiel #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--;
 }