Some tweaks to the rogue character

This commit is contained in:
Linus Probert 2018-10-24 22:18:56 +02:00
parent 5985c3e7f6
commit 120f8d7ff6
3 changed files with 19 additions and 6 deletions

View File

@ -19,6 +19,10 @@ run: $(all)
@LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ ./_build/debug/breakhack @LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ ./_build/debug/breakhack
.PHONY: run .PHONY: run
playtest: $(all)
@LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ ./_build/release/breakhack
.PHONY: run
lint: lint:
@make lint -sC _build/debug @make lint -sC _build/debug
.PHONY: lint .PHONY: lint

View File

@ -646,7 +646,14 @@ player_reset_steps(Player *p)
p->stat_data.steps = 0; p->stat_data.steps = 0;
} }
void player_update(UpdateData *data) static void
reset_dagger_skill(Player *p)
{
p->skills[3]->resetCountdown = 0;
}
void
player_update(UpdateData *data)
{ {
Player *player = data->player; Player *player = data->player;
if (player->stats.hp <= 0) if (player->stats.hp <= 0)
@ -674,6 +681,8 @@ void player_update(UpdateData *data)
} else { } else {
projectile_destroy(p); projectile_destroy(p);
action_spent(player); action_spent(player);
if (player->class == ROGUE)
reset_dagger_skill(player);
} }
} }

View File

@ -436,7 +436,7 @@ skill_trip(Skill *skill, SkillData *data)
break; break;
} }
} }
monster_set_state(space->monster, STUNNED, (Uint8)(1 + player_has_artifact(data->player, INCREASED_STUN))); monster_set_state(space->monster, STUNNED, (Uint8)(2 + player_has_artifact(data->player, INCREASED_STUN)));
} }
@ -458,7 +458,7 @@ create_trip(void)
Skill *skill = create_default("Trip", s); Skill *skill = create_default("Trip", s);
skill->levelcap = 3; skill->levelcap = 3;
skill->instantUse = false; skill->instantUse = false;
skill->resetTime = 3; skill->resetTime = 2;
skill->available = NULL; skill->available = NULL;
skill->use = skill_trip; skill->use = skill_trip;
skill->actionRequired = true; skill->actionRequired = true;
@ -501,7 +501,7 @@ skill_backstab(Skill *skill, SkillData *data)
player_monster_kill_check(data->player, m); player_monster_kill_check(data->player, m);
if (dmg) { if (dmg) {
mixer_play_effect(SWORD_HIT); mixer_play_effect(SWORD_HIT);
monster_set_state(m, STUNNED, (Uint8)(1 + player_has_artifact(data->player, INCREASED_STUN))); monster_set_state(m, STUNNED, (Uint8)(3 + player_has_artifact(data->player, INCREASED_STUN)));
} }
} }
@ -520,7 +520,7 @@ create_backstab(void)
Skill *skill = create_default("Backstab", s); Skill *skill = create_default("Backstab", s);
skill->levelcap = 2; skill->levelcap = 2;
skill->instantUse = false; skill->instantUse = false;
skill->resetTime = 5; skill->resetTime = 2;
skill->available = NULL; skill->available = NULL;
skill->use = skill_backstab; skill->use = skill_backstab;
skill->actionRequired = true; skill->actionRequired = true;
@ -548,7 +548,7 @@ create_phase(void)
Skill *skill = create_default("Phase", s); Skill *skill = create_default("Phase", s);
skill->levelcap = 4; skill->levelcap = 4;
skill->instantUse = true; skill->instantUse = true;
skill->resetTime = 8; skill->resetTime = 6;
skill->available = NULL; skill->available = NULL;
skill->use = skill_phase; skill->use = skill_phase;
skill->actionRequired = false; skill->actionRequired = false;