예제 #1
0
 public override void steppedOn(Level level, int x, int y, Entity entity)
 {
     if (entity is Mob)
     {
         level.setData(x, y, 10);
     }
 }
예제 #2
0
 public override bool mayPass(Level level, int x, int y, Entity e)
 {
     return e.canSwim();
 }
예제 #3
0
 public override void touchedBy(Entity entity)
 {
     if (time > 30) entity.touchItem(this);
 }
예제 #4
0
 public override bool mayPass(Level level, int x, int y, Entity e)
 {
     return false;
 }
예제 #5
0
 public override void steppedOn(Level level, int xt, int yt, Entity entity)
 {
     if (random.nextInt(60) != 0) return;
     if (level.getData(xt, yt) < 5) return;
     level.setTile(xt, yt, Tile.dirt, 0);
 }
예제 #6
0
 public override void bumpedInto(Level level, int x, int y, Entity entity)
 {
     entity.hurt(this, x, y, 3);
 }
예제 #7
0
 public override void steppedOn(Level level, int xt, int yt, Entity entity)
 {
     if (random.nextInt(60) != 0) return;
     if (level.getData(xt, yt) < 2) return;
     harvest(level, xt, yt);
 }
예제 #8
0
        public override void touchedBy(Entity entity) {
		if (entity is Player) {
			entity.hurt(this, lvl + 1, dir);
		}
	}
예제 #9
0
        public override void touchedBy(Entity entity)
        {

            if (!(entity is Player))
            {
                entity.touchedBy(this);
            }
        }
예제 #10
0
 private int getAttackDamage(Entity e)
 {
     int dmg = random.nextInt(3) + 1;
     if (attackItem != null)
     {
         dmg += attackItem.getAttackDamageBonus(e);
     }
     return dmg;
 }
예제 #11
0
 public override bool mayPass(Level level, int x, int y, Entity e)
 {
     if (e is AirWizard) return true;
     return false;
 }
예제 #12
0
 public override bool blocks(Entity e)
 {
     return e.isBlockableBy(this);
 }