Commit 3d85aac9 authored by wind2009's avatar wind2009

Fix

parent 9010968b
Pipeline #38627 failed with stages
in 1 minute and 42 seconds
No preview for this file type
#created by ygomobile
100244001
100244002
100244005
100244032
\ No newline at end of file
No preview for this file type
......@@ -88,4 +88,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
and c:IsRelateToChain() and c:IsCanOverlay() and aux.NecroValleyFilter()(c) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
\ No newline at end of file
end
......@@ -28,7 +28,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.thfilter(c)
return (aux.IsCodeListed(c,63977008,60800381) and c:IsType(TYPE_SPELL+TYPE_TRAP) or c:IsCode(8529136)) and c:IsAbleToHand()
return (aux.IsCodeListed(c,60800381) and c:IsType(TYPE_SPELL+TYPE_TRAP) or c:IsCode(63977008)) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -43,9 +43,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
return Duel.IsBattlePhase() and Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end
function s.atktg(e,c)
return aux.IsCodeListed(c,60800381) or c:IsOriginalSetCard(0x43) and c:IsType(TYPE_SYNCHRO)
end
\ No newline at end of file
end
......@@ -9,6 +9,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
......@@ -16,10 +17,11 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsFaceup() and (c:IsCode(60800381) or aux.IsCodeListed(c,60800381))
return c:IsFaceup() and not c:IsCode(id)
and (c:IsCode(60800381) or aux.IsCodeListed(c,60800381) and c:IsType(TYPE_MONSTER))
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_MZONE,1,nil)
return Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_ONFIELD,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -28,7 +30,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
local e1=Effect.CreateEffect(c)
......@@ -42,4 +44,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
function s.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
end
......@@ -4,14 +4,15 @@ function s.initial_effect(c)
aux.AddMaterialCodeList(c,63977008,60800381,44508094)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--substitute as a monster
--lvdown
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
......@@ -22,32 +23,40 @@ function s.initial_effect(c)
e2:SetOperation(s.lvop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
function s.thfilter1(c)
return c:IsCode(63977008) and c:IsAbleToHand()
end
function s.thfilter2(c)
return (aux.IsCodeListed(c,60800381) or aux.IsCodeListed(c,44508094)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thfilter(c)
return (c:IsCode(63977008) or (aux.IsCodeListed(c,60800381) or aux.IsCodeListed(c,44508094)) and c:IsType(TYPE_MONSTER)) and c:IsAbleToHand()
return (c:IsCode(63977008) or (aux.IsCodeListed(c,60800381) or aux.IsCodeListed(c,44508094)) and c:IsType(TYPE_MONSTER))
and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetCode)>=2 and g:IsExists(s.cfilter,1,nil)
return g:CheckSubGroup(aux.gffcheck,2,2,s.thfilter1,nil,s.thfilter2,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function s.check(g)
return g:GetClassCount(Card.GetCode)>=2 and g:IsExists(s.cfilter,1,nil)
return g:GetClassCount(Card.GetCode)>=2 and g:IsExists(s.cfilter,1,nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<2 then return end
if not g:CheckSubGroup(aux.gffcheck,2,2,s.thfilter1,nil,s.thfilter2,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg1=g:SelectSubGroup(tp,s.check,false,2,2)
Duel.SendtoHand(tg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg1)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
local tg1=g:SelectSubGroup(tp,aux.gffcheck,false,2,2,s.thfilter1,nil,s.thfilter2,nil)
if #tg1==2 then
Duel.SendtoHand(tg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg1)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
Duel.ShuffleHand(tp)
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
end
end
function s.lvfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:GetLevel()>1 and c:IsFaceup()
......@@ -61,7 +70,8 @@ end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then
if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and tc:GetLevel()>1
and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
......@@ -80,4 +90,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
end
end
\ No newline at end of file
end
......@@ -47,26 +47,27 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=nil
if tg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=tg:Select(tp,ft,ft,nil)
else
g=tg
end
if g:GetCount()>0 then
for tc in aux.Next(g) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if ft>0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=nil
if tg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=tg:Select(tp,ft,ft,nil)
else
g=tg
end
if g:GetCount()>0 then
for tc in aux.Next(g) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
Duel.SpecialSummonComplete()
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
......@@ -116,4 +117,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure()
end
end
end
\ No newline at end of file
end
......@@ -83,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
end
......@@ -74,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
\ No newline at end of file
end
--スクラップ・フィスト
function c8529136.initial_effect(c)
aux.AddCodeList(c,60800381)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c8529136.condition)
e1:SetTarget(c8529136.target)
e1:SetOperation(c8529136.activate)
c:RegisterEffect(e1)
end
function c8529136.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()<PHASE_MAIN2
end
function c8529136.filter(c)
return c:IsFaceup() and c:IsCode(60800381) and c:GetFlagEffect(8529136)==0
end
function c8529136.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c8529136.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c8529136.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c8529136.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c8529136.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:GetFlagEffect(8529136)==0 then
tc:RegisterFlagEffect(8529136,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetCondition(c8529136.actcon)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetCondition(c8529136.effcon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e3:SetCondition(c8529136.damcon)
e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3,true)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetCondition(c8529136.effcon)
e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
end
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_DAMAGE_STEP_END)
e5:SetCondition(c8529136.descon)
e5:SetOperation(c8529136.desop)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e5,true)
end
end
function c8529136.actcon(e)
local c=e:GetHandler()
return (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) and c:GetBattleTarget()~=nil
and e:GetOwnerPlayer()==e:GetHandlerPlayer()
end
function c8529136.effcon(e)
return e:GetOwnerPlayer()==e:GetHandlerPlayer()
end
function c8529136.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil
end
function c8529136.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
return tc and tc:IsRelateToBattle() and e:GetOwnerPlayer()==tp
end
function c8529136.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
Duel.Hint(HINT_CARD,0,8529136)
Duel.Destroy(tc,REASON_EFFECT)
end
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