forked from github/server
fix for flee spell
This commit is contained in:
parent
8b2857f582
commit
fae0c2608c
|
@ -6195,21 +6195,21 @@ static int sp_flee(castorder *co) {
|
||||||
if (co->force <= 0) {
|
if (co->force <= 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return flee_spell(co, 4);
|
return flee_spell(co, 4, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sp_song_of_fear(castorder *co) {
|
static int sp_song_of_fear(castorder *co) {
|
||||||
if (co->force <= 0) {
|
if (co->force <= 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return flee_spell(co, 3);
|
return flee_spell(co, 3, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sp_aura_of_fear(castorder *co) {
|
static int sp_aura_of_fear(castorder *co) {
|
||||||
if (co->force <= 0) {
|
if (co->force <= 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return flee_spell(co, 5);
|
return flee_spell(co, 5, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sp_armor_shield(struct castorder * co) {
|
static int sp_armor_shield(struct castorder * co) {
|
||||||
|
|
|
@ -861,7 +861,7 @@ static bool select_afraid(const side *vs, const fighter *fig, void *cbdata)
|
||||||
|
|
||||||
/* Gesang der Furcht (Kampfzauber) */
|
/* Gesang der Furcht (Kampfzauber) */
|
||||||
/* Panik (Praekampfzauber) */
|
/* Panik (Praekampfzauber) */
|
||||||
int flee_spell(struct castorder * co, int strength)
|
int flee_spell(struct castorder * co, int strength, bool wounded)
|
||||||
{
|
{
|
||||||
fighter * fi = co->magician.fig;
|
fighter * fi = co->magician.fig;
|
||||||
int level = co->level;
|
int level = co->level;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef H_GC_COMBATSPELLS
|
#ifndef H_GC_COMBATSPELLS
|
||||||
#define H_GC_COMBATSPELLS
|
#define H_GC_COMBATSPELLS
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -36,7 +38,7 @@ extern "C" {
|
||||||
int sp_undeadhero(struct castorder * co);
|
int sp_undeadhero(struct castorder * co);
|
||||||
int sp_immolation(struct castorder * co);
|
int sp_immolation(struct castorder * co);
|
||||||
|
|
||||||
int flee_spell(struct castorder * co, int strength);
|
int flee_spell(struct castorder * co, int strength, bool wounded);
|
||||||
int damage_spell(struct castorder * co, int dmg, int strength);
|
int damage_spell(struct castorder * co, int dmg, int strength);
|
||||||
int armor_spell(struct castorder * co, int per_level, int time_multi);
|
int armor_spell(struct castorder * co, int per_level, int time_multi);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue