Commit 3aad64b4 authored by Amiya's avatar Amiya

1205新卡修复

parent 5f48c537
Pipeline #25833 passed with stages
in 1 minute and 14 seconds
...@@ -7,7 +7,7 @@ function s.initial_effect(c) ...@@ -7,7 +7,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon) e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
...@@ -27,7 +27,7 @@ function s.initial_effect(c) ...@@ -27,7 +27,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsPreviousLocation(LOCATION_MZONE+LOCATION_HAND) and c:GetOriginalRace()&RACE_THUNDER==RACE_THUNDER return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE+LOCATION_HAND) and c:GetOriginalRace()&RACE_THUNDER==RACE_THUNDER and c::GetOriginalType&TYPE_MONSTER==TYPE_MONSTER
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil) return eg:IsExists(s.cfilter,1,nil)
......
...@@ -6,7 +6,8 @@ function s.initial_effect(c) ...@@ -6,7 +6,8 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetOperation(s.disoperation) e1:SetCondition(s.discon)
e1:SetOperation(s.disop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
...@@ -21,7 +22,8 @@ function s.initial_effect(c) ...@@ -21,7 +22,8 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING) e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetOperation(s.disoperation) e3:SetCondition(s.discon)
e3:SetOperation(s.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0)) e4:SetDescription(aux.Stringid(id,0))
...@@ -33,12 +35,17 @@ function s.initial_effect(c) ...@@ -33,12 +35,17 @@ function s.initial_effect(c)
e4:SetOperation(s.penop) e4:SetOperation(s.penop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.disoperation(e,tp,eg,ep,ev,re,r,rp) function s.discon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetColumnGroup() local c=e:GetHandler()
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local op,loc,seq2=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
if bit.band(tl,LOCATION_ONFIELD)~=0 and g:IsContains(re:GetHandler()) then local seq1=aux.MZoneSequence(c:GetSequence())
Duel.NegateEffect(ev) seq2=aux.MZoneSequence(seq2)
end return bit.band(loc,LOCATION_ONFIELD)~=0
and (op==1-tp and seq1==4-seq2 or op==tp and seq1==seq2)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.NegateEffect(ev)
end end
function s.hspzone(tp) function s.hspzone(tp)
local zone=0 local zone=0
......
...@@ -31,7 +31,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsLevel(4) and c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -40,23 +40,24 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,23 +40,24 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end
end end
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
...@@ -72,7 +73,7 @@ function s.splimit(e,c) ...@@ -72,7 +73,7 @@ function s.splimit(e,c)
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
return c:IsRace(RACE_CYBERSE) and c:IsControler(tp) or (bc and bc:IsRace(RACE_CYBERSE) and c:IsControler(tp)) return (c:IsRace(RACE_CYBERSE) and c:IsControler(tp) or (bc and bc:IsRace(RACE_CYBERSE) and bc:IsControler(tp))) and (not bc or c:GetControler()~=bc:GetControler())
end end
function s.damcon(e,tp,eg,ep,ev,re,r,rp) function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:IsExists(s.cfilter,1,nil,tp) return ep~=tp and eg:IsExists(s.cfilter,1,nil,tp)
......
...@@ -52,24 +52,25 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,24 +52,25 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
if tc:GetBattledGroupCount()>0 and c:IsControlerCanBeChanged() and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if tc:GetBattledGroupCount()>0 and not tc:IsType(TYPE_TRAP) and c:IsControlerCanBeChanged() and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.GetControl(tc,tp,PHASE_END,1) Duel.GetControl(tc,tp,PHASE_END,1)
end end
end end
......
...@@ -44,12 +44,9 @@ end ...@@ -44,12 +44,9 @@ end
function s.cfilter(c,sp) function s.cfilter(c,sp)
return c:IsSummonPlayer(sp) and c:IsFaceup() return c:IsSummonPlayer(sp) and c:IsFaceup()
end end
function s.lpcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and eg:IsExists(s.cfilter,1,nil,1-tp)
end
function s.lpcon1(e,tp,eg,ep,ev,re,r,rp) function s.lpcon1(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and eg:IsExists(s.cfilter,1,nil,1-tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS)) and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end end
function s.lpop1(e,tp,eg,ep,ev,re,r,rp) function s.lpop1(e,tp,eg,ep,ev,re,r,rp)
...@@ -59,6 +56,7 @@ function s.lpop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,6 +56,7 @@ function s.lpop1(e,tp,eg,ep,ev,re,r,rp)
end end
function s.regcon(e,tp,eg,ep,ev,re,r,rp) function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and eg:IsExists(s.cfilter,1,nil,1-tp)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end end
function s.regop(e,tp,eg,ep,ev,re,r,rp) function s.regop(e,tp,eg,ep,ev,re,r,rp)
...@@ -78,6 +76,7 @@ end ...@@ -78,6 +76,7 @@ end
function s.lpop2(e,tp,eg,ep,ev,re,r,rp) function s.lpop2(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(id) e:GetHandler():ResetFlagEffect(id)
local lg=e:GetLabelObject():GetLabelObject() local lg=e:GetLabelObject():GetLabelObject()
lg=lg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
local rnum=lg:GetSum(Card.GetAttack) local rnum=lg:GetSum(Card.GetAttack)
local g=Group.CreateGroup() local g=Group.CreateGroup()
g:KeepAlive() g:KeepAlive()
...@@ -111,8 +110,5 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,8 +110,5 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(e:GetLabel()) e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end end
end end
\ No newline at end of file
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