Commit e46df7a3 authored by wind2009's avatar wind2009

Fix

parent b50eed7c
Pipeline #40191 failed with stages
in 1 minute and 24 seconds
No preview for this file type
#created by ygomobile
101303201
101303202
101303203
101303204
101303205
101303206
101303207
101303208
\ No newline at end of file
......@@ -64,7 +64,7 @@ function s.atttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.attop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and not c:IsAttribute(ATTRIBUTE_DARK) then
if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and not tc:IsAttribute(ATTRIBUTE_DARK) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
......@@ -73,4 +73,4 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
end
......@@ -41,11 +41,15 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
if ct>5 then ct=6 end
if ct>1 then
local cg=Duel.GetDecktopGroup(1-tp,1)
if not cg:GetFirst():IsAbleToRemove(tp) then
return
end
local tbl={}
for i=1,ct do
table.insert(tbl,i)
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2))
ct=Duel.AnnounceNumber(tp,table.unpack(tbl))
end
Duel.ConfirmDecktop(1-tp,ct)
......
......@@ -77,4 +77,4 @@ function s.spsop(e,tp,eg,ep,ev,re,r,rp)
end
function s.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
end
......@@ -63,10 +63,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
function s.eqfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsFaceup()
and Duel.IsExistingMatchingCard(s.eqfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
and Duel.IsExistingMatchingCard(s.eqfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp)
end
function s.eqfilter2(c)
function s.eqfilter2(c,tp)
return c:IsFaceupEx() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_LINK) and not c:IsForbidden()
and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.eqfilter(chkc,tp) end
......@@ -80,9 +81,9 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToCard() then
if tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
local ec=g:GetFirst()
if not ec or not Duel.Equip(tp,ec,tc) then return end
local e1=Effect.CreateEffect(c)
......@@ -118,4 +119,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToChain() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -24,6 +24,7 @@ function s.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCondition(s.discon)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
......@@ -45,7 +46,7 @@ function s.val(e,re,rp)
return rp==1-e:GetHandlerPlayer()
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
return Duel.IsMainPhase()
end
function s.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x102)
......@@ -54,7 +55,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local sg=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc) end
if chk==0 then return sg:GetCount()>0 and Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,sg,1,0,0)
......@@ -110,4 +111,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
end
......@@ -75,4 +75,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc2)
end
end
\ No newline at end of file
end
......@@ -3,6 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -94,13 +95,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce and not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat)
Duel.Remove(mat,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
elseif ce then
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
......@@ -136,4 +137,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
aux.RCheckAdditional=nil
end
end
\ No newline at end of file
end
......@@ -3,6 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
......@@ -45,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
rc:RegisterEffect(e1,true)
end
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