Commit 4d1e4dd0 authored by wind2009's avatar wind2009

Fix

parent e603ad16
Pipeline #41604 passed with stages
in 2 minutes and 48 seconds
No preview for this file type
#created by ygomobile
101304201
101304202
101304203
101304204
101304205
101304206
101304207
101304208
\ No newline at end of file
......@@ -152,4 +152,4 @@ function s.cedop(e,tp,eg,ep,ev,re,r,rp)
end
function s.chainlm(e,rp,tp)
return tp==rp
end
\ No newline at end of file
end
......@@ -82,7 +82,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
function s.lvfilter(c)
return c:IsType(TYPE_TUNER) and c:GetLevel()>0 and not c:IsLevel(1) and c:IsFaceup()
return c:IsType(TYPE_TUNER) and c:IsLevelAbove(2) and not c:IsLevel(1) and c:IsFaceup()
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end
......@@ -90,14 +90,18 @@ function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,6,nil)
end
function s.lvopfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsLevel(1)
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToChain,nil):Filter(Card.IsFaceup,nil):Filter(aux.NOT(Card.IsLevel),nil,1):Filter(Card.IsType,nil,TYPE_MONSTER)
local g=Duel.GetTargetsRelateToChain():Filter(s.lvopfilter,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
end
......@@ -15,7 +15,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -34,7 +34,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsFaceup() and not (c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)) or c:IsFacedown()
return c:IsFacedown() or not (c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO))
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
......@@ -90,4 +90,4 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
\ No newline at end of file
end
......@@ -73,8 +73,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
and (e:GetHandler():GetReasonCard():IsCode(70902743)
or aux.IsCodeListed(e:GetHandler():GetReasonCard(),70902743))
and aux.IsCodeOrListed(e:GetHandler():GetReasonCard(),70902743)
end
function s.spfilter(c,e,tp)
return c:IsRace(RACE_FIEND) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......@@ -92,4 +91,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToChain() and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
end
......@@ -10,7 +10,7 @@ function s.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.AssaultModeLimit)
c:RegisterEffect(e1)
--negate
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_REMOVE)
......@@ -51,6 +51,7 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,0,REASON_COST+REASON_TEMPORARY)~=0 and c:GetOriginalCode()==id then
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
......@@ -76,6 +77,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
......@@ -106,4 +108,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
end
......@@ -23,7 +23,6 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
......@@ -51,7 +50,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsActiveType(TYPE_MONSTER)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -87,4 +86,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete()
tc:CompleteProcedure()
end
end
\ No newline at end of file
end
......@@ -43,24 +43,24 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
local spf=tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and ft>0
if tc:IsAbleToHand() and (not spf or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
elseif spf and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
......@@ -75,4 +75,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -18,7 +18,6 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCondition(s.atkcon)
e2:SetCost(aux.bfgcost)
e2:SetOperation(s.atkop)
......@@ -52,4 +51,4 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
\ No newline at end of file
end
......@@ -81,4 +81,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
function s.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
\ No newline at end of file
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