Struct rust_warrior::warrior::Warrior [−][src]
pub struct Warrior { /* fields omitted */ }
Expand description
An interface the player can interact with to control the Warrior in the
game. An instance is passed to Player
via the
play_turn
method.
The player must pick one Action
to perform
each turn. Not all abilities are an Action
.
Warrior abilities are unlocked as the player progresses through the levels.
Level Guide
Level 1
Available abilities:
Level 2
New abilities unlocked at this level:
Level 3
New abilities unlocked at this level:
Level 4
No new abilities unlocked at this level!
Level 5
New abilities unlocked at this level:
Level 6
The following abilities now have a directional counterpart:
walk
->walk_toward
check
->check_toward
attack
->attack_toward
rescue
->rescue_toward
Level 7
New abilities unlocked at this level:
Level 8
New abilities (and directional counterparts) unlocked at this level:
look
->look_toward
shoot
->shoot_toward
Level 9
No new abilities unlocked at this level!
Implementations
pub fn new(
level: usize,
ahead: Vec<Tile>,
behind: Vec<Tile>,
health: i32,
facing: Direction
) -> Warrior
Walk forward one tile.
This is an Action
.
This ability is available at Level 1.
Walk one tile toward specified direction
.
This is an Action
.
This ability is unlocked at Level 6.
Check the tile in front of the Warrior.
Returns a Tile
.
This ability is unlocked at Level 2.
Check the tile toward specified direction
.
Returns a Tile
.
This ability is unlocked at Level 6.
Check three tiles in front of the Warrior.
Returns a vector of up to three Tile
s.
This ability is unlocked at Level 8.
Check three tiles toward specified direction
.
Returns a vector of up to three Tile
s.
This ability is unlocked at Level 8.
Attempt to attack an enemy in the tile in front of the Warrior.
This is an Action
.
This ability is unlocked at Level 2.
Attempt to attack an enemy one tile away in specified direction
.
This is an Action
.
This ability is unlocked at Level 6.
Check the current health of the Warrior. This ability is unlocked at Level 3.
Rest and regain 10% of the Warrior’s HP.
This is an Action
.
This ability is unlocked at Level 3.
Attempt to rescue a Captive in front of the Warrior.
This is an Action
.
This ability is unlocked at Level 5.
Attempt to rescue a Captive one tile away in specified direction
.
This is an Action
.
This ability is unlocked at Level 6.
Fire an arrow up to three tiles in front of the Warrior.
This is an Action
.
This ability is unlocked at Level 8.
Fire an arrow up to three tiles toward specified direction
.
This is an Action
.
This ability is unlocked at Level 8.