Commit d2f13209 authored by VanillaSalt's avatar VanillaSalt

fix

parent f7def221
...@@ -2049,7 +2049,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) { ...@@ -2049,7 +2049,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
for(auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) { for(auto cait = core.current_chain.begin(); cait != core.current_chain.end(); ++cait) {
if(cait->triggering_player == priority) { if(cait->triggering_player == priority) {
if(!(peffect->flag & EFFECT_FLAG_MULTIACT_HAND)) { if(!(peffect->flag & EFFECT_FLAG_MULTIACT_HAND)) {
if(cait->triggering_location == LOCATION_HAND || cait->triggering_effect->handler->data.code == peffect->handler->data.code) { if(cait->triggering_location == LOCATION_HAND) {
act = false; act = false;
break; break;
} }
......
...@@ -21,7 +21,6 @@ function c25460258.initial_effect(c) ...@@ -21,7 +21,6 @@ function c25460258.initial_effect(c)
e2:SetTarget(c25460258.rmtg) e2:SetTarget(c25460258.rmtg)
e2:SetOperation(c25460258.rmop) e2:SetOperation(c25460258.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c25460258.spfilter(c,att) function c25460258.spfilter(c,att)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() return c:IsAttribute(att) and c:IsAbleToRemoveAsCost()
......
...@@ -18,16 +18,22 @@ function c36378213.filter(c,e,tp) ...@@ -18,16 +18,22 @@ function c36378213.filter(c,e,tp)
end end
function c36378213.target(e,tp,eg,ep,ev,re,r,rp,chk) function c36378213.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c36378213.filter,nil,e,tp) local g=eg:Filter(c36378213.filter,nil,e,tp)
if chk==0 then return g:GetCount()~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=g:GetCount() end if chk==0 then return g:GetCount()~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetTargetCard(eg) Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c36378213.spfilter(c,e,tp) function c36378213.spfilter(c,e,tp)
return c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsSetCard(0x16) return c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsSetCard(0x16)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRelateToEffect(e)
end end
function c36378213.activate(e,tp,eg,ep,ev,re,r,rp) function c36378213.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=eg:Filter(c36378213.spfilter,nil,e,tp) local g=eg:Filter(c36378213.spfilter,nil,e,tp)
if g:GetCount()==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then return end if g:GetCount()==0 then return end
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,1,ft,nil)
end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
...@@ -46,7 +46,6 @@ function c3701074.filter(c,e,tp) ...@@ -46,7 +46,6 @@ function c3701074.filter(c,e,tp)
end end
function c3701074.rectg2(e,tp,eg,ep,ev,re,r,rp,chk) function c3701074.rectg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c3701074.filter,1,nil,nil,tp) end if chk==0 then return eg:IsExists(c3701074.filter,1,nil,nil,tp) end
local g=eg:Filter(c3701074.filter,nil,nil,tp)
Duel.SetTargetCard(eg) Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,0) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,0)
end end
...@@ -54,7 +53,10 @@ function c3701074.recop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +53,10 @@ function c3701074.recop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=eg:Filter(c3701074.filter,nil,e,tp) local g=eg:Filter(c3701074.filter,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
local rec=g:GetSum(Card.GetAttack)/2 if g:GetCount()>1 then
Duel.Recover(1-tp,rec,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
g=g:Select(tp,1,1,nil)
end
Duel.Recover(1-tp,g:GetFirst():GetAttack()/2,REASON_EFFECT)
end end
end end
...@@ -51,13 +51,14 @@ end ...@@ -51,13 +51,14 @@ end
function c38522377.atkop(e,tp,eg,ep,ev,re,r,rp) function c38522377.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c38522377.atkfilter,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c38522377.atkfilter,nil,e)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
local tc=g:GetFirst() local og=Duel.GetOperatedGroup()
local tc=og:GetFirst()
local atk=0 local atk=0
while tc do while tc do
local oatk=tc:GetTextAttack() local oatk=tc:GetTextAttack()
if oatk<0 then oatk=0 end if oatk<0 then oatk=0 end
atk=atk+oatk atk=atk+oatk
tc=g:GetNext() tc=og:GetNext()
end end
if atk~=0 then if atk~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -41,9 +41,9 @@ function c60202749.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,9 +41,9 @@ function c60202749.target(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetOperation(c60202749.sdesop) e1:SetOperation(c60202749.sdesop)
if Duel.GetCurrentPhase()==PHASE_END and Duel.GetTurnPlayer()~=tp then if Duel.GetCurrentPhase()==PHASE_END and Duel.GetTurnPlayer()~=tp then
e1:SetLabel(1) e1:SetLabel(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_OPPO_TURN,2) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
else else
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_OPPO_TURN) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
end end
e:GetHandler():RegisterEffect(e1) e:GetHandler():RegisterEffect(e1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
......
...@@ -13,7 +13,6 @@ function c75292259.atcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -13,7 +13,6 @@ function c75292259.atcon(e,tp,eg,ep,ev,re,r,rp)
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
return c==Duel.GetAttacker() and bc and bc:IsRelateToBattle() return c==Duel.GetAttacker() and bc and bc:IsRelateToBattle()
and bc:GetBattlePosition()==POS_FACEUP_ATTACK and c:IsChainAttackable(3) and bc:GetBattlePosition()==POS_FACEUP_ATTACK and c:IsChainAttackable(3)
end end
function c75292259.atop(e,tp,eg,ep,ev,re,r,rp) function c75292259.atop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(75292259,0)) then if Duel.SelectYesNo(tp,aux.Stringid(75292259,0)) then
......
...@@ -27,8 +27,7 @@ function c99342953.initial_effect(c) ...@@ -27,8 +27,7 @@ function c99342953.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c99342953.ctfilter(c) function c99342953.ctfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0xc) return c:IsFaceup() and c:IsSetCard(0xc) and c:IsLocation(LOCATION_MZONE)
and (not c:IsReason(REASON_BATTLE) or bit.band(c:GetBattlePosition(),POS_FACEUP)~=0)
end end
function c99342953.ctcon(e,tp,eg,ep,ev,re,r,rp) function c99342953.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c99342953.ctfilter,1,nil) return eg:IsExists(c99342953.ctfilter,1,nil)
......
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