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

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

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

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