Commit a14faeec authored by Amiya's avatar Amiya

修复

parent 85338828
Pipeline #39498 failed with stages
in 3 minutes and 17 seconds
No preview for this file type
......@@ -31,8 +31,8 @@ end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
if rp~=1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) and g and g:IsExists(s.cfilter,1,nil,tp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return (loc&LOCATION_ONFIELD)~=0 and re:IsActiveType(TYPE_MONSTER) and g and g:IsExists(s.cfilter,1,nil,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -64,7 +64,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local ac=Duel.GetFirstTarget()
if ac and ac:IsRelateToEffect(e) then
if ac and ac:IsRelateToEffect(e) and ac:IsType(TYPE_MONSTER) then
s.cfop(e,tp,eg,ep,ev,re,r,rp,ac)
end
end
......@@ -82,7 +82,7 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp,ac)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(ac:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ac:RegisterEffect(e1)
elseif tc:IsType(TYPE_TRAP) then
Duel.Remove(ac,POS_FACEUP,REASON_EFFECT)
......
......@@ -25,18 +25,18 @@ function s.initial_effect(c)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHANGE_POS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHANGE_POS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(s.thcon)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
function s.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
......
......@@ -73,7 +73,7 @@ function s.gspop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(0)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
......
......@@ -32,7 +32,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsLevelAbove(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
......@@ -43,7 +43,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp)
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_HAND+LOCATION_GRAVE
if ev>=2000 then loc=loc+LOCATION_DECK+LOCATION_EXTRA end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -64,7 +64,7 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp)
end
function s.efilter(re)
return function(e,te)
return te==re
return te==re and te:IsActivated()
end
end
function s.setfilter(c)
......
......@@ -62,8 +62,9 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc or not tc:IsRelateToChain() or not tc:IsType(TYPE_MONSTER) then return end
if e:GetLabel()==1 then
if tc:IsRelateToChain() and tc:IsFaceup() then
if tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......@@ -72,7 +73,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
elseif e:GetLabel()==2 then
if tc:IsRelateToChain() and tc:IsFaceup() then
if tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......@@ -81,7 +82,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
elseif e:GetLabel()==3 then
if tc:IsFaceup() and tc:IsRelateToChain() and tc:IsCanBeDisabledByEffect(e) then
if tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -96,8 +97,6 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2)
end
elseif e:GetLabel()==4 then
if tc:IsRelateToChain() then
Duel.Destroy(tc,REASON_EFFECT)
end
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -3,10 +3,10 @@ local s,id,o=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x70)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--to extra
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
......
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