Commit 989fc0c6 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:Fluorohydride/ygopro-core

parents d71e1ea4 9dde9718
......@@ -1892,7 +1892,8 @@ void field::get_ritual_material(uint8 playerid, effect* peffect, card_set* mater
&& (no_level || pcard->get_level() > 0))
material->insert(pcard);
for(auto& pcard : player[playerid].list_extra)
if(pcard && (pcard->get_level() || pcard->is_affected_by_effect(EFFECT_MINIATURE_GARDEN_GIRL)) && (pcard->data.type & TYPE_MONSTER) && pcard->is_affected_by_effect(EFFECT_MAP_OF_HEAVEN) && pcard->is_capable_send_to_grave(playerid))
if(((pcard->is_affected_by_effect(EFFECT_EXTRA_RITUAL_MATERIAL) || pcard->data.type & TYPE_MONSTER) && pcard->is_affected_by_effect(EFFECT_MAP_OF_HEAVEN) && pcard->is_capable_send_to_grave(playerid))
&& (no_level || pcard->get_level() > 0 || pcard->is_affected_by_effect(EFFECT_MINIATURE_GARDEN_GIRL)))
material->insert(pcard);
}
void field::get_fusion_material(uint8 playerid, card_set* material_all, card_set* material_base, uint32 location) {
......@@ -1957,21 +1958,17 @@ void field::get_fusion_material(uint8 playerid, card_set* material_all, card_set
void field::ritual_release(card_set* material) {
card_set rel;
card_set rem;
card_set xyz;
card_set tg;
card_set tgy;
for(auto& pcard : *material) {
if(pcard->current.location == LOCATION_GRAVE)
rem.insert(pcard);
else if (pcard->current.location == LOCATION_EXTRA && pcard->is_affected_by_effect(EFFECT_MAP_OF_HEAVEN))
tg.insert(pcard);
else if(pcard->current.location == LOCATION_OVERLAY)
xyz.insert(pcard);
else if(pcard->current.location == LOCATION_OVERLAY || pcard->current.location == LOCATION_EXTRA)
tgy.insert(pcard);
else
rel.insert(pcard);
}
send_to(&xyz, core.reason_effect, REASON_RITUAL + REASON_EFFECT + REASON_MATERIAL, core.reason_player, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP);
send_to(&tgy, core.reason_effect, REASON_RITUAL + REASON_EFFECT + REASON_MATERIAL, core.reason_player, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP);
release(&rel, core.reason_effect, REASON_RITUAL + REASON_EFFECT + REASON_MATERIAL, core.reason_player);
send_to(&tg, core.reason_effect, REASON_RITUAL + REASON_EFFECT + REASON_MATERIAL, core.reason_player, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP);
send_to(&rem, core.reason_effect, REASON_RITUAL + REASON_EFFECT + REASON_MATERIAL, core.reason_player, PLAYER_NONE, LOCATION_REMOVED, 0, POS_FACEUP);
}
void field::get_xyz_material(card* scard, int32 findex, uint32 lv, int32 maxc, group* mg) {
......
......@@ -200,7 +200,7 @@ void field::special_summon_complete(effect* reason_effect, uint8 reason_player)
void field::destroy(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence) {
for(auto cit = targets->begin(); cit != targets->end();) {
card* pcard = *cit;
if(pcard->is_status(STATUS_DESTROY_CONFIRMED)) {
if(pcard->is_status(STATUS_DESTROY_CONFIRMED) && core.destroy_canceled.find(pcard) == core.destroy_canceled.end()) {
targets->erase(cit++);
continue;
}
......
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