Commit 525837b6 authored by salix5's avatar salix5 Committed by GitHub

update chain::chain_operation_sort() (#370)

compare chain_id when tied
parent 573b6579
......@@ -15,7 +15,10 @@
int32 field::field_used_count[32] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5};
bool chain::chain_operation_sort(const chain& c1, const chain& c2) {
return c1.triggering_effect->id < c2.triggering_effect->id;
if (c1.triggering_effect && c2.triggering_effect && c1.triggering_effect->id != c2.triggering_effect->id)
return c1.triggering_effect->id < c2.triggering_effect->id;
else
return c1.chain_id < c2.chain_id;
}
void chain::set_triggering_state(card* pcard) {
triggering_controler = pcard->current.controler;
......
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