Commit 2b2b091b authored by DailyShana's avatar DailyShana

type

parent 2ebfb5b6
...@@ -57,13 +57,13 @@ int32 effect::is_disable_related() { ...@@ -57,13 +57,13 @@ int32 effect::is_disable_related() {
return TRUE; return TRUE;
return FALSE; return FALSE;
} }
bool effect::is_can_be_forbidden() { int32 effect::is_can_be_forbidden() {
uint32 ctr = code & 0xf0000; uint32 ctr = code & 0xf0000;
if (is_flag(EFFECT_FLAG_CANNOT_DISABLE) && !is_flag(EFFECT_FLAG_CANNOT_NEGATED)) if (is_flag(EFFECT_FLAG_CANNOT_DISABLE) && !is_flag(EFFECT_FLAG_CANNOT_NEGATED))
return false; return FALSE;
if (code == EFFECT_CHANGE_CODE || ctr == EFFECT_COUNTER_PERMIT || ctr == EFFECT_COUNTER_LIMIT) if (code == EFFECT_CHANGE_CODE || ctr == EFFECT_COUNTER_PERMIT || ctr == EFFECT_COUNTER_LIMIT)
return false; return FALSE;
return true; return TRUE;
} }
// check if a single/field/equip effect is available // check if a single/field/equip effect is available
// check properties: range, EFFECT_FLAG_OWNER_RELATE, STATUS_BATTLE_DESTROYED, STATUS_EFFECT_ENABLED, disabled/forbidden // check properties: range, EFFECT_FLAG_OWNER_RELATE, STATUS_BATTLE_DESTROYED, STATUS_EFFECT_ENABLED, disabled/forbidden
......
...@@ -63,7 +63,7 @@ public: ...@@ -63,7 +63,7 @@ public:
~effect(); ~effect();
int32 is_disable_related(); int32 is_disable_related();
bool is_can_be_forbidden(); int32 is_can_be_forbidden();
int32 is_available(); int32 is_available();
int32 check_count_limit(uint8 playerid); int32 check_count_limit(uint8 playerid);
int32 is_activateable(uint8 playerid, const tevent& e, int32 neglect_cond = FALSE, int32 neglect_cost = FALSE, int32 neglect_target = FALSE); int32 is_activateable(uint8 playerid, const tevent& e, int32 neglect_cond = FALSE, int32 neglect_cost = FALSE, int32 neglect_target = FALSE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment