Commit 30c61f49 authored by POLYMER's avatar POLYMER

fix

parent a946a48e
......@@ -28,7 +28,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END-RESET_TURN_SET,EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -77,7 +77,7 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if ev==e:GetLabel() then rc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1)) end
if ev==e:GetLabel() then rc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END-RESET_TURN_SET,EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1)) end
end
function cm.recon(e,tp,eg,ep,ev,re,r,rp)
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
......@@ -106,7 +106,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local og=og1:Filter(cm.rffilter,nil)
if og and #og>0 then
for oc in aux.Next(og) do
oc:RegisterFlagEffect(m-1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
oc:RegisterFlagEffect(m-1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END-RESET_TURN_SET,0,1,fid)
end
og:KeepAlive()
if Duel.GetCurrentChain()>1 then
......@@ -144,6 +144,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
Duel.ReturnToField(tc)
end
......
......@@ -390,6 +390,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -371,6 +371,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -426,6 +426,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -404,6 +404,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -424,6 +424,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -464,6 +464,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -192,6 +192,8 @@ function cm.returntofield(tc,e)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -237,6 +237,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -174,6 +174,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -140,6 +140,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -295,6 +295,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -62,11 +62,17 @@ function cm.initial_effect(c)
cm[0]=e
return _PConditionFilter(c,e,...)
end
local _PendOperationCheck=aux.PendOperationCheck
function aux.PendOperationCheck(ft1,ft2,ft)
cm[2]=true
return _PendOperationCheck(ft1,ft2,ft)
end
local _SelectSubGroup=Group.SelectSubGroup
function Group.SelectSubGroup(...)
local res=_SelectSubGroup(...)
if res and cm[0] then cm[1]=cm[0] end
if res and cm[0] and cm[2] then cm[1]=cm[0] end
cm[0]=nil
cm[2]=nil
return res
end
local _Merge=Group.Merge
......@@ -252,6 +258,8 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -154,7 +154,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.MoveToField(sc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
cm.regop(e,tp,eg,ep,ev,re,r,rp)
--cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -62,11 +62,17 @@ function cm.initial_effect(c)
cm[0]=e
return _PConditionFilter(c,e,...)
end
local _PendOperationCheck=aux.PendOperationCheck
function aux.PendOperationCheck(ft1,ft2,ft)
cm[2]=true
return _PendOperationCheck(ft1,ft2,ft)
end
local _SelectSubGroup=Group.SelectSubGroup
function Group.SelectSubGroup(...)
local res=_SelectSubGroup(...)
if res and cm[0] then cm[1]=cm[0] end
if res and cm[0] and cm[2] then cm[1]=cm[0] end
cm[0]=nil
cm[2]=nil
return res
end
local _Merge=Group.Merge
......
......@@ -203,7 +203,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.MoveToField(sc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
cm.regop(e,tp,eg,ep,ev,re,r,rp)
--cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -61,11 +61,17 @@ function cm.initial_effect(c)
cm[0]=e
return _PConditionFilter(c,e,...)
end
local _PendOperationCheck=aux.PendOperationCheck
function aux.PendOperationCheck(ft1,ft2,ft)
cm[2]=true
return _PendOperationCheck(ft1,ft2,ft)
end
local _SelectSubGroup=Group.SelectSubGroup
function Group.SelectSubGroup(...)
local res=_SelectSubGroup(...)
if res and cm[0] then cm[1]=cm[0] end
if res and cm[0] and cm[2] then cm[1]=cm[0] end
cm[0]=nil
cm[2]=nil
return res
end
local _Merge=Group.Merge
......
......@@ -64,7 +64,7 @@ function c28322511.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetValue(0x284)
tc:RegisterEffect(e3)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(28322511,2))
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(28322511,2))
end
end
function c28322511.thcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -41,7 +41,7 @@ end
function c28366214.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c28366214.cfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local atk=g:GetSum(Card.GetRank)+g:GetSum(Card.GetLevel)
if atk>0 then
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -59,11 +59,11 @@ function c28366214.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetLabelObject(tc)
e2:SetValue(1)
e2:SetCondition(c28366214.actcon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(28366214,2)) then
Duel.BreakEffect()
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,99,REASON_EFFECT+REASON_DISCARD)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
......@@ -71,18 +71,14 @@ function c28366214.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetOwnerPlayer(tp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(28366214,3))
if not tc:IsAttribute(ATTRIBUTE_FIRE) then
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c28366214.atktg)
e4:SetLabel(tc:GetFieldID())
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(ct*1000)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
end
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(28366214,3))
end
end
function c28366214.actcon(e)
......@@ -91,9 +87,6 @@ end
function c28366214.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c28366214.atktg(e,c)
return e:GetLabel()~=c:GetFieldID()
end
function c28366214.thcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
return eg:IsContains(e:GetHandler()) and re:GetHandler():IsType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x284)
......
......@@ -8,6 +8,7 @@ function c98921053.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98921053,0))
e1:SetCountLimit(1,98921053)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
......
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