Commit 27e0668f authored by VanillaSalt's avatar VanillaSalt

fix control_adjust

parent a9108454
......@@ -478,7 +478,7 @@ int32 card::get_attack() {
int32 rev = FALSE;
if(is_affected_by_effect(EFFECT_REVERSE_UPDATE))
rev = TRUE;
effect_set effects_atk, effects_def, effects_atk_r, effects_def_r;
effect_set effects_atk, effects_atk_r;
int32 swap_final = FALSE, swap_final_b = FALSE;
for(int32 i = 0; i < eset.size(); ++i) {
switch(eset[i]->code) {
......@@ -528,11 +528,6 @@ int32 card::get_attack() {
def = eset[i]->get_value(this);
up_def = 0;
upc_def = 0;
} else {
if(!eset[i]->is_flag(EFFECT_FLAG_DELAY))
effects_def.add_item(eset[i]);
else
effects_def_r.add_item(eset[i]);
}
break;
case EFFECT_SET_BASE_DEFENSE:
......@@ -690,7 +685,7 @@ int32 card::get_defense() {
int32 rev = FALSE;
if(is_affected_by_effect(EFFECT_REVERSE_UPDATE))
rev = TRUE;
effect_set effects_atk, effects_def, effects_atk_r, effects_def_r;
effect_set effects_def, effects_def_r;
int32 swap_final = FALSE, swap_final_b = FALSE;
for(int32 i = 0; i < eset.size(); ++i) {
switch(eset[i]->code) {
......@@ -710,11 +705,6 @@ int32 card::get_defense() {
atk = eset[i]->get_value(this);
up_atk = 0;
upc_atk = 0;
} else {
if(!eset[i]->is_flag(EFFECT_FLAG_DELAY))
effects_atk.add_item(eset[i]);
else
effects_atk_r.add_item(eset[i]);
}
break;
case EFFECT_SET_BASE_ATTACK:
......
......@@ -1003,8 +1003,8 @@ int32 field::control_adjust(uint16 step) {
case 0: {
card_set* destroy_set = new card_set;
core.units.begin()->peffect = (effect*)destroy_set;
uint32 b0 = get_useable_count(0, LOCATION_MZONE, PLAYER_NONE, 0);
uint32 b1 = get_useable_count(1, LOCATION_MZONE, PLAYER_NONE, 0);
uint32 b0 = get_useable_count(0, LOCATION_MZONE, 0, LOCATION_REASON_CONTROL);
uint32 b1 = get_useable_count(1, LOCATION_MZONE, 1, LOCATION_REASON_CONTROL);
for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ++cit)
(*cit)->filter_disable_related_cards();
for(auto cit = core.control_adjust_set[1].begin(); cit != core.control_adjust_set[1].end(); ++cit)
......
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