Commit 75229b0c authored by salix5's avatar salix5

effect::is_activateable

http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=4&cid=8272
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=4&cid=8624
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=4&cid=6092
EFFECT_TYPE_SINGLE + EVENT_TO_GRAVE/EVENT_SPSUMMON_SUCCESS/EVENT_TO_HAND
these effects can be activated in damage step by default
parent 5df92f1c
......@@ -158,7 +158,8 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
return FALSE;
if(pduel->game_field->player[playerid].list_szone[6] && pduel->game_field->player[playerid].list_szone[7])
return FALSE;
} else if(!(handler->data.type & TYPE_FIELD) && pduel->game_field->get_useable_count(playerid, LOCATION_SZONE, playerid, LOCATION_REASON_TOFIELD) <= 0)
} else if(!(handler->data.type & TYPE_FIELD)
&& pduel->game_field->get_useable_count(playerid, LOCATION_SZONE, playerid, LOCATION_REASON_TOFIELD) <= 0)
return FALSE;
} else if(handler->current.location == LOCATION_SZONE) {
if(handler->is_position(POS_FACEUP))
......@@ -204,7 +205,8 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
&& (!handler->is_position(POS_FACEUP) || !handler->is_status(STATUS_EFFECT_ENABLED)))
return FALSE;
if(!(type & (EFFECT_TYPE_FLIP | EFFECT_TYPE_TRIGGER_F))
&& !((type & EFFECT_TYPE_SINGLE) && (code == EVENT_TO_GRAVE || code == EVENT_DESTROYED || code == EVENT_SPSUMMON_SUCCESS))) {
&& !((type & EFFECT_TYPE_SINGLE)
&& (code == EVENT_TO_GRAVE || code == EVENT_DESTROYED || code == EVENT_SPSUMMON_SUCCESS || code == EVENT_TO_HAND))) {
if((code < 1132 || code > 1149) && pduel->game_field->infos.phase == PHASE_DAMAGE && !(flag & EFFECT_FLAG_DAMAGE_STEP))
return FALSE;
if((code < 1134 || code > 1136) && pduel->game_field->infos.phase == PHASE_DAMAGE_CAL && !(flag & EFFECT_FLAG_DAMAGE_CAL))
......
......@@ -26,7 +26,7 @@ function c12247206.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
tc:CreateEffectRelation(e)
local g=Duel.GetMatchingGroup(c12247206.filter,tp,0x13,0,nil,tc,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),PLAYER_ALL,0)
end
function c12247206.filter(c,tc,e,tp)
return c12247206.nfilter(c,tc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -5,7 +5,6 @@ function c14983497.initial_effect(c)
e1:SetDescription(aux.Stringid(14983497,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c14983497.spcon)
e1:SetTarget(c14983497.sptg)
......
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