Commit 00b46664 authored by POLYMER's avatar POLYMER

fix

parent e7f0e691
...@@ -152,7 +152,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab) ...@@ -152,7 +152,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
local b1=0 local b1=0
local fid=e:GetLabel() local fid=e:GetLabel()
if fid~=0 then b1=1 end if fid~=0 then b1=1 end
if g and #g>0 and Duel.GetFlagEffect(0,m)==0 then if g and #g>0 and Duel.GetFlagEffect(0,11451711)==0 then
if opt==2 then return true end if opt==2 then return true end
Duel.HintSelection(Group.FromCards(c)) Duel.HintSelection(Group.FromCards(c))
--if Duel.SelectYesNo(tp,aux.Stringid(m,4+b1)) then --if Duel.SelectYesNo(tp,aux.Stringid(m,4+b1)) then
...@@ -166,7 +166,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab) ...@@ -166,7 +166,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
e1:SetValue(lab*500) e1:SetValue(lab*500)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.CalculateDamage(c,tc) Duel.CalculateDamage(c,tc)
Duel.RegisterFlagEffect(0,m,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(0,11451711,RESET_PHASE+PHASE_DAMAGE,0,1)
end end
if fid~=0 then Duel.RaiseEvent(c,11451718,e,fid,0,0,0) end if fid~=0 then Duel.RaiseEvent(c,11451718,e,fid,0,0,0) end
if opt==1 then Duel.RegisterFlagEffect(tp,0xffffff+m,RESET_PHASE+PHASE_END,0,1) end if opt==1 then Duel.RegisterFlagEffect(tp,0xffffff+m,RESET_PHASE+PHASE_END,0,1) end
......
...@@ -3,7 +3,8 @@ local cm, m, ofs = GetID() ...@@ -3,7 +3,8 @@ local cm, m, ofs = GetID()
local yr = 13020010 local yr = 13020010
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c, yr) aux.AddCodeList(c, yr)
c:SetUniqueOnField(1,0,m) c:SetSPSummonOnce(m)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,cm.filter66,aux.FilterBoolFunction(Card.IsType,TYPE_EFFECT),true) aux.AddFusionProcFun2(c,cm.filter66,aux.FilterBoolFunction(Card.IsType,TYPE_EFFECT),true)
...@@ -37,25 +38,7 @@ end ...@@ -37,25 +38,7 @@ end
function cm.filter(c,c2) function cm.filter(c,c2)
return c:IsType(TYPE_EQUIP) and not c:IsForbidden() and aux.IsCodeListed(c, yr) and c:CheckEquipTarget(c2) return c:IsType(TYPE_EQUIP) and not c:IsForbidden() and aux.IsCodeListed(c, yr) and c:CheckEquipTarget(c2)
end end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,c)
if g:GetCount()>0 then
g=g:GetFirst()
local mg=Group.CreateGroup()
mg:AddCard(c)
local g2=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
mg:Merge(g2)
local tc=c
if g:IsLocation(LOCATION_GRAVE) and #mg>1 then
tc=mg:Select(tp, 1, 1, nil):GetFirst()
end
Duel.Equip(tp,g,tc,true,true)
Duel.BreakEffect()
Duel.Remove(c, POS_FACEUP,REASON_EFFECT)
end
end
function cm.AddContactFusionProcedure(c,filter,self_location,opponent_location,mat_operation,...) function cm.AddContactFusionProcedure(c,filter,self_location,opponent_location,mat_operation,...)
self_location=self_location or 0 self_location=self_location or 0
opponent_location=opponent_location or 0 opponent_location=opponent_location or 0
...@@ -98,17 +81,20 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,17 +81,20 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
g=g:GetFirst() g=g:GetFirst()
local mg=Group.CreateGroup() local mg=Group.CreateGroup()
mg:AddCard(c) mg:AddCard(c)
local g2=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) local g2=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
mg:Merge(g2) mg:Merge(g2)
local tc=c local tc=c
if g:IsLocation(LOCATION_GRAVE) and #mg>1 then if g:IsLocation(LOCATION_GRAVE) and #mg>1 then
tc=mg:Select(tp, 1, 1, nil):GetFirst() tc=mg:Select(tp, 1, 1, nil):GetFirst()
Duel.Equip(tp,g,tc,true)
else
Duel.Equip(tp,g,tc,true)
end end
Duel.Equip(tp,g,tc,true,true)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Remove(c, POS_FACEUP,REASON_EFFECT) Duel.Remove(c, POS_FACEUP,REASON_EFFECT)
end end
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return c:IsPreviousControler(tp) return c:IsPreviousControler(tp)
and c:GetReasonPlayer()==1-tp and c:GetReasonPlayer()==1-tp
......
...@@ -111,10 +111,10 @@ function cm.filter6(c,e,tp,id,g) ...@@ -111,10 +111,10 @@ function cm.filter6(c,e,tp,id,g)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and #g:Filter(cm.filter4, nil,c)~=0 return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and #g:Filter(cm.filter4, nil,c)~=0
end end
function cm.filter5(c,e,tp) function cm.filter5(c,e,tp)
return c:IsType(TYPE_EQUIP) return c:IsType(TYPE_EQUIP) or c:IsType(TYPE_UNION)
end end
function cm.filter4(c,c2) function cm.filter4(c,c2)
return c2:CheckEquipTarget(c) and not c:IsCode(m) return c:CheckEquipTarget(c2) and not c:IsCode(m)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -134,6 +134,10 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -134,6 +134,10 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g2 = Duel.GetMatchingGroup( cm.filter5, tp, LOCATION_GRAVE+QY_cw, 0, nil,e,tp) local g2 = Duel.GetMatchingGroup( cm.filter5, tp, LOCATION_GRAVE+QY_cw, 0, nil,e,tp)
local g1 = Duel.SelectMatchingCard(tp, cm.filter6, tp, LOCATION_GRAVE+QY_cw, 0, 1, 1, nil,e,tp,m,g2):GetFirst() local g1 = Duel.SelectMatchingCard(tp, cm.filter6, tp, LOCATION_GRAVE+QY_cw, 0, 1, 1, nil,e,tp,m,g2):GetFirst()
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
g2=g2:Filter(cm.filter4, nil,g1):GetFirst() g2=g2:FilterSelect(tp,cm.filter4,1,1,nil,g1):GetFirst()
Duel.Equip(tp,g2,g1,true) Duel.Equip(tp,g2,g1,true)
end end
...@@ -70,13 +70,14 @@ function c260023011.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,13 +70,14 @@ function c260023011.effop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,260025011) --e1:SetCountLimit(1,260025011)
e1:SetCost(aux.bfgcost) e1:SetCost(aux.bfgcost)
e1:SetTarget(c260023011.destg) e1:SetTarget(c260023011.destg)
e1:SetOperation(c260023011.desop) e1:SetOperation(c260023011.desop)
e1:SetOwnerPlayer(ep) e1:SetOwnerPlayer(ep)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true) rc:RegisterEffect(e1,true)
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(260023011,1))
end end
function c260023011.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c260023011.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
......
...@@ -100,13 +100,14 @@ function c260023013.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,13 +100,14 @@ function c260023013.effop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) --e1:SetCountLimit(1)
e1:SetCost(aux.bfgcost) e1:SetCost(aux.bfgcost)
e1:SetTarget(c260023013.drtg) e1:SetTarget(c260023013.drtg)
e1:SetOperation(c260023013.drop) e1:SetOperation(c260023013.drop)
e1:SetOwnerPlayer(ep) e1:SetOwnerPlayer(ep)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true) rc:RegisterEffect(e1,true)
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(260023013,2))
end end
function c260023013.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c260023013.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
...@@ -84,7 +84,7 @@ function cm.rcop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,7 +84,7 @@ function cm.rcop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(ct) e1:SetValue(ct)
sc:RegisterEffect(e1) sc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
......
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