Commit d02c4e98 authored by wind2009's avatar wind2009

Fix

parent d9499aa2
Pipeline #35846 passed with stages
in 3 minutes and 13 seconds
...@@ -93,7 +93,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +93,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.GetControl(tc,tp) Duel.GetControl(tc,tp)
end end
if c:IsRelateToEffect(e) then if c:IsRelateToChain() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......
...@@ -25,7 +25,7 @@ function s.initial_effect(c) ...@@ -25,7 +25,7 @@ function s.initial_effect(c)
e2:SetLabelObject(c) e2:SetLabelObject(c)
e2:SetCondition(s.eacon) e2:SetCondition(s.eacon)
e2:SetOperation(s.addop) e2:SetOperation(s.addop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x8f,0x54,0x59,0x82) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x8f,0x54,0x59,0x82)
...@@ -53,9 +53,10 @@ function s.addop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,9 +53,10 @@ function s.addop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ec=e:GetLabelObject() local ec=e:GetLabelObject()
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
local eid=EVENT_CUSTOM+id+ec:GetFieldID()
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CUSTOM+id) e2:SetCode(eid)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
...@@ -63,7 +64,7 @@ function s.addop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +64,7 @@ function s.addop(e,tp,eg,ep,ev,re,r,rp)
e2:SetTarget(s.eatg) e2:SetTarget(s.eatg)
e2:SetOperation(s.eaop) e2:SetOperation(s.eaop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,re,r,rp,ep,ev) Duel.RaiseSingleEvent(c,eid,re,r,rp,ep,ev)
end end
function s.eacon(e,tp,eg,ep,ev,re,r,rp) function s.eacon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -75,7 +76,7 @@ function s.eatg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -75,7 +76,7 @@ function s.eatg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.eaop(e,tp,eg,ep,ev,re,r,rp) function s.eaop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToChain() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetCode(EFFECT_EXTRA_ATTACK)
......
...@@ -49,7 +49,7 @@ function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +49,7 @@ function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.atkop(e,tp,eg,ep,ev,re,r,rp) function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToCard() and c:IsFaceup() then
local atk=c:GetAttack() local atk=c:GetAttack()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -76,9 +76,10 @@ end ...@@ -76,9 +76,10 @@ end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp) then if c:IsRelateToChain() and c:IsFaceup() and c:IsControler(tp) then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:IsLocation(LOCATION_MZONE) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0
Duel.SendtoGrave(c,REASON_EFFECT) or tc:IsFacedown() or not tc:IsRelateToChain() or not tc:IsLocation(LOCATION_MZONE) then
Duel.SendtoGrave(c,REASON_RULE)
return return
end end
if not Duel.Equip(tp,c,tc) then return end if not Duel.Equip(tp,c,tc) then return end
......
...@@ -58,7 +58,9 @@ function s.antg(e,c) ...@@ -58,7 +58,9 @@ function s.antg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) return e:GetHandler():GetLinkedGroup():IsContains(c)
end end
function s.discon(e,tp,eg,ep,ev,re,r,rp) function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRelateToChain() and e:GetHandler():GetLinkedGroup():IsContains(re:GetHandler()) local rc=re:GetHandler()
return rc and re:IsActiveType(TYPE_MONSTER) and rc:IsRelateToChain() and e:GetHandler():GetLinkedGroup():IsContains(rc)
and rc:IsCanBeDisabledByEffect(e) and Duel.IsChainDisablable(ev)
end end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id) Duel.Hint(HINT_CARD,0,id)
......
...@@ -60,6 +60,9 @@ end ...@@ -60,6 +60,9 @@ end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_FZONE,LOCATION_FZONE,nil) local ct=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_FZONE,LOCATION_FZONE,nil)
if chk==0 then return ct>0 end if chk==0 then return ct>0 end
if not Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500)
end
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_FZONE,LOCATION_FZONE,nil) local ct=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_FZONE,LOCATION_FZONE,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