Commit 1bef321c authored by salix5's avatar salix5

Merge pull request #1496 from DailyShana/patch-7

fix control adjust(Remove Brainwashing) and unique cards(self destroy)
parents 2d9da392 5aaf32d9
......@@ -1014,12 +1014,18 @@ int32 field::control_adjust(uint16 step) {
card_set* adjust_set = (card_set*)core.units.begin()->ptarget;
delete adjust_set;
core.control_adjust_set[0].insert(core.control_adjust_set[1].begin(), core.control_adjust_set[1].end());
for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ++cit) {
(*cit)->filter_disable_related_cards();
if((*cit)->unique_code)
add_unique_card(*cit);
raise_single_event((*cit), 0, EVENT_CONTROL_CHANGED, 0, REASON_RULE, 0, 0, 0);
for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ) {
card* pcard = *cit++;
if(!(pcard->current.location & LOCATION_ONFIELD)) {
core.control_adjust_set[0].erase(pcard);
continue;
}
pcard->filter_disable_related_cards();
if(pcard->unique_code)
add_unique_card(pcard);
raise_single_event(pcard, 0, EVENT_CONTROL_CHANGED, 0, REASON_RULE, 0, 0, 0);
}
if(core.control_adjust_set[0].size())
raise_event(&core.control_adjust_set[0], EVENT_CONTROL_CHANGED, 0, 0, 0, 0, 0);
process_single_event();
process_instant_event();
......
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