protected override bool OnEffect(Vec pos, Direction direction) { AddEffect(new Effect(pos, direction, mAttack.EffectType, mAttack.Element)); Dungeon.HitAt(pos, this, new Hit(mNoun, mAttack, direction)); // stop if we hit a wall return(!Dungeon.Tiles[pos].IsPassable); }
protected override void OnEffect(Vec pos, Direction direction, bool leadingEdge) { if (leadingEdge) { AddEffect(new Effect(pos, EffectType.Ball, mAttack.Element)); Dungeon.HitAt(pos, this, new Hit(mNoun, mAttack, direction)); } else { AddEffect(new Effect(pos, EffectType.BallTrail, mAttack.Element)); } }
protected override bool OnEffect(Vec pos, Direction direction) { AddEffect(new Effect(pos, direction, mAttack.EffectType, mAttack.Element)); return(Dungeon.HitAt(pos, this, new Hit(mNoun, mAttack, direction))); }