Commit b08f8a88 authored by VanillaSalt's avatar VanillaSalt

fix

parent b02fb8a8
......@@ -2192,11 +2192,16 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
}
case 25: {
group* pgroup = core.units.begin()->ptarget;
card_set cset;
for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) {
(*cit)->set_status(STATUS_SUMMONING, TRUE);
raise_single_event(*cit, 0, EVENT_SPSUMMON, (*cit)->current.reason_effect, 0, (*cit)->current.reason_player, (*cit)->summon_player, 0);
if(!(*cit)->is_affected_by_effect(EFFECT_CANNOT_DISABLE_SPSUMMON)) {
raise_single_event(*cit, 0, EVENT_SPSUMMON, (*cit)->current.reason_effect, 0, (*cit)->current.reason_player, (*cit)->summon_player, 0);
cset.insert(*cit);
}
}
raise_event(&pgroup->container, EVENT_SPSUMMON, core.units.begin()->peffect, 0, sumplayer, PLAYER_NONE, 0);
if(cset.size())
raise_event(&cset, EVENT_SPSUMMON, core.units.begin()->peffect, 0, sumplayer, PLAYER_NONE, 0);
process_single_event();
process_instant_event();
add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, TRUE, TRUE);
......@@ -4211,13 +4216,13 @@ int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable,
for(auto cit = core.release_cards_ex.begin(); cit != core.release_cards_ex.end(); ++cit)
rmax += (*cit)->operation_param;
core.temp_var[0] = 0;
if(rmax < min)
if(rmax < min) {
returns.ivalue[0] = TRUE;
else if(!core.release_cards_ex_sum.empty()) {
if(rmax == 0 && min == 2)
core.temp_var[0] = 1;
} else if(!core.release_cards_ex_sum.empty())
add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, playerid, 92);
} else
else
core.units.begin()->step = 2;
return FALSE;
}
......
......@@ -4409,6 +4409,10 @@ int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_pl
switch(step) {
case 0: {
core.solving_event.splice(core.solving_event.begin(), core.sub_solving_event);
if(!peffect->check_count_limit(triggering_player)) {
core.solving_event.pop_front();
return TRUE;
}
chain newchain;
newchain.chain_id = 0;
newchain.chain_count = 0;
......
......@@ -19,14 +19,15 @@ function c13455953.initial_effect(c)
c:RegisterEffect(e2)
end
function c13455953.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,13455953)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x42))
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,13455953,RESET_PHASE+PHASE_END,0,1)
end
function c13455953.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -5,6 +5,8 @@ function c37436476.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c37436476.condition)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
......@@ -16,6 +18,9 @@ function c37436476.initial_effect(c)
e2:SetValue(c37436476.val)
c:RegisterEffect(e2)
end
function c37436476.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c37436476.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39)*100
end
......@@ -87,8 +87,8 @@ function c55742055.target2(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c55742055.filter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c55742055.eqfilter(c,tc)
return c:IsType(TYPE_EQUIP) and c:IsSetCard(0x207a) and c:CheckEquipTarget(tc)
function c55742055.eqfilter(c,tc,tp)
return c:IsType(TYPE_EQUIP) and c:IsSetCard(0x207a) and c:CheckEquipTarget(tc) and c:CheckUniqueOnField(tp)
end
function c55742055.operation2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
......@@ -97,7 +97,7 @@ function c55742055.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c55742055.filter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local tg=Duel.GetMatchingGroup(c55742055.eqfilter,tp,LOCATION_HAND,0,nil,tc)
local tg=Duel.GetMatchingGroup(c55742055.eqfilter,tp,LOCATION_HAND,0,nil,tc,tp)
if tg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(55742055,4)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
......
......@@ -41,7 +41,7 @@ function c65025250.filter(c,tp)
end
function c65025250.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c65025250.filter,1,nil,tp) end
return Duel.SelectYesNo(tp,aux.Stringid(65025250,0))
return Duel.SelectYesNo(tp,aux.Stringid(65025250,1))
end
function c65025250.repval(e,c)
return c65025250.filter(c,e:GetHandlerPlayer())
......
......@@ -4,9 +4,8 @@ function c82324312.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(82324312,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c82324312.condition)
e1:SetOperation(c82324312.operation)
c:RegisterEffect(e1)
......@@ -21,10 +20,10 @@ function c82324312.initial_effect(c)
c:RegisterEffect(e2)
end
function c82324312.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and r==REASON_BATTLE and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()==nil
return ep~=tp and Duel.GetAttackTarget()==nil
end
function c82324312.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil)
local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(ep,1)
Duel.ConfirmCards(tp,sg)
......
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