Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public CreatureCommand Act(int x, int y)
- {
- var action = new CreatureCommand();
- if (y < Game.MapHeight - 1)
- {
- if ((Count > 0) && (Game.Map[x, y + 1] is Player || Game.Map[x, y + 1] is Monster))
- {
- //Game.IsOver = true;
- ContinueFalling(ref Count, ref action.DeltaY);
- return action;
- }
- else if (Game.Map[x, y + 1] == null)
- {
- ContinueFalling(ref Count, ref action.DeltaY);
- return action;
- }
- if (Count > 1 && Game.Map[x, y] != null)
- return new CreatureCommand { TransformTo = new Gold() };
- else
- Count = 0;
- return action;
- }
- if (Count > 1 && Game.Map[x, y] != null)
- return new CreatureCommand { TransformTo = new Gold() };
- else
- Count = 0;
- //action.TransformTo = Count > 1 && Game.Map[x, y] != null
- // ? new Gold()
- // : null;
- return action;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement