public void ActivateTrap(DungeonCharacter player) { Controller.Log($"{player.Name} got hit by a poison dart trap."); Random rand = new Random(); player.TakeDamage(rand.Next(15, 35)); }
public void ActivateTrap(DungeonCharacter player) { Controller.Log($"{player.Name} walked into a bear trap."); Random rand = new Random(); player.TakeDamage(rand.Next(15) + 1); }
public void Initialize(DungeonCharacter dc, CharBehaviour c) { dchar = dc; charBehaviour = c; c.achar = this; planned = false; }
public void ActivateTrap(DungeonCharacter player) { Controller.Log($"{player.Name} fell into a spike pit."); Random rand = new Random(); player.TakeDamage(rand.Next(5, 21)); }
public static string[] OptionsFor(DungeonCharacter dc) { List<string> performed = dc.actions.Select(a => a.execName).ToList(); List<string> optionList = new List<string>(); if (!performed.Contains("move")) { optionList.Add("Move"); } if (!performed.Contains("lob") && !performed.Contains("attack") && !performed.Contains("strand") && !performed.Contains("skill")) { //optionList.Add("Strand"); if (dc.entity.AnyAbove()) { optionList.Add("Lob"); //optionList.Add("Put down"); } else { optionList.Add("Lift"); optionList.Add("Attack"); optionList.Add("Whirlwind"); optionList.Add("Inferno"); } } if (dc.entity.tile.exitable) { optionList.Add("Exit"); } return optionList.ToArray(); }
public Inferno(DungeonCharacter dc) { dchar = dc; tileRange = dchar.GetPassTileRange(range); config = new TileActionConfig(tileRange); }
public Lob(DungeonCharacter dc) { dchar = dc; //not really. fix with a different tile range function later tileRange = dchar.GetPassTileRange(dchar.character.lobRange, null, null, LobbableTile); config = new TileActionConfig(tileRange); }
public LiftExec(DungeonCharacter dc, DungeonEntity b, Tile t) { dchar = dc; target = dc.entity.tile; bottom = b; origin = t; lifted = t.entities.ToArray(); origCount = origin.entities.IndexOf(bottom); }
public Attack(DungeonCharacter dc) { dchar = dc; tileRange = dchar.entity.tile.GetNeighbors(); tileRange.RemoveAll(t => t.entities.Count == 0 || t.GetBottomChar() == null); config = new TileActionConfig(tileRange); }
public Move(DungeonCharacter dc) { dchar = dc; rangesLeft = new Dictionary<int, float>(); parents = new Dictionary<int, int>(); tileRange = dchar.GetPassTileRange(dc.character.moveRange, rangesLeft, parents, dchar.TraversibleTile); config = new TileActionConfig(tileRange); }
public void Select(DungeonCharacter dc, ReturnFunction rf, CancelFunction cf) { rfunc = rf; cfunc = cf; dchar = dc; options = OptionsFor(dc); selIndex = 0; screenPos = Camera.mainCamera.WorldToScreenPoint(dc.entity.tile.worldPos); screenPos.y = Screen.height - screenPos.y; selecting = true; }
public void RemoveCharacter(DungeonCharacter character) { switch (character.faction) { case CharacterFaction.PLAYER: Players.Remove(character); break; case CharacterFaction.FRIENDLY: Friendlies.Remove(character); break; case CharacterFaction.ENEMY: Enemies.Remove(character); break; default: break; } }
public void Battle(DungeonCharacter opponent) { Controller.Log($"{opponent.Name} battles {Name}."); Controller.Log("---------------------------------------------"); while (opponent.StillAlive && StillAlive) { opponent.MakeBattleMove(opponent.ChooseBattleOption(), this); if (StillAlive) { MakeBattleMove(ChooseBattleOption(), opponent); } } if (StillAlive) { Controller.Log($"{opponent} was defeated by {Name}."); } else { Controller.Log($"{Name} was defeated by {opponent}."); } }
public InfernoExec(DungeonCharacter dc, Tile t) { dchar = dc; target = t; }
public MoveExec(DungeonCharacter dc, Tile o, Tile t, List<Tile> p) { dchar = dc; target = t; origin = o; path = p; movingEntities = dc.entity.AllAbove(true); }
public string GetMessage(DungeonCharacter attacker, DungeonCharacter target) { return($"{attacker.Name} attacks {target.Name} using {Description}."); }
public LobExec(DungeonCharacter dc, Tile t) { dchar = dc; lobbees = dc.entity.AllAbove(false).ToArray(); target = t; }
public AttackExec(DungeonCharacter dc, DungeonCharacter t) { dchar = dc; dtarget = t; }
public IEnumerator StartCharSelect(DungeonCharacter bchar) { yield return 0; charSelect.Select(bchar, SetAction, Cancel); }
public WhirlwindExec(DungeonCharacter dc, Tile t) { dchar = dc; target = t; }