merged AL-races
This commit is contained in:
@ -54,6 +54,13 @@ int character::get_room_num() const {
|
||||
return room_num;
|
||||
}
|
||||
|
||||
<<< <<< < HEAD
|
||||
== == == =
|
||||
bool character::is_hostile() const {
|
||||
return hostile;
|
||||
}
|
||||
|
||||
>>> >>> > AL - races
|
||||
void character::set_room_num(const int room) {
|
||||
room_num = room;
|
||||
}
|
||||
@ -82,6 +89,39 @@ void character::set_hitrate(const fraction nhitrate) {
|
||||
base_hit_rate = nhitrate;
|
||||
}
|
||||
|
||||
<<< <<< < HEAD
|
||||
== == == =
|
||||
void character::set_hostile(const bool is_hostile) {
|
||||
hostile = is_hostile;
|
||||
}
|
||||
|
||||
void character::apply_buff(const stat_name statn, const int amount) {
|
||||
// TODO: add checks for bounds
|
||||
switch (statn) {
|
||||
case stat_name::HP:
|
||||
HP += amount;
|
||||
break;
|
||||
|
||||
case stat_name::ATK:
|
||||
ATK += amount;
|
||||
break;
|
||||
|
||||
case stat_name::DEF:
|
||||
DEF += amount;
|
||||
break;
|
||||
|
||||
case stat_name::hostile: {
|
||||
if (amount > 0)
|
||||
hostile = true;
|
||||
else
|
||||
hostile = false;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
>>> >>> > AL - races
|
||||
direction_list character::moveable(const position_list &available_positions)
|
||||
const {
|
||||
direction_list result;
|
||||
@ -164,4 +204,3 @@ result character::move(const direction dir,
|
||||
int calc_dmg(const int ATK, const int DEF) {
|
||||
return ceil((100.0f / (100.0f + DEF)) * ATK);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user