Commit 6b16f434 authored by POLYMER's avatar POLYMER

fix

parent 7220687b
......@@ -31,7 +31,7 @@ function c11513092.cgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local d1=(re:IsHasCategory(CATEGORY_DRAW) or re:IsHasCategory(CATEGORY_TOHAND)) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=2 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,2,nil)
local d2=re:IsHasCategory(CATEGORY_TOGRAVE) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=2 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,2,nil)
local d3=re:IsHasCategory(CATEGORY_REMOVE) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=2 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,2,nil)
if chk==0 then return d1 or d2 or d3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c11513092.penfilter,tp,LOCATION_EXTRA,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))end
if chk==0 then return (d1 or d2 or d3) and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c11513092.penfilter,tp,LOCATION_EXTRA,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11513092.cgop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -28,10 +28,10 @@ function c11513093.cgcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c11513093.cgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local d1=(re:IsHasCategory(CATEGORY_DRAW) or re:IsHasCategory(CATEGORY_TOHAND)) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil)
local d2=re:IsHasCategory(CATEGORY_TOGRAVE) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil)
local d3=re:IsHasCategory(CATEGORY_REMOVE) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return d1 or d2 or d3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c11513092.penfilter,tp,LOCATION_EXTRA,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
local d1=(re:IsHasCategory(CATEGORY_DRAW) or re:IsHasCategory(CATEGORY_TOHAND)) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,1-tp,LOCATION_DECK,0,1,nil)
local d2=re:IsHasCategory(CATEGORY_TOGRAVE) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,1-tp,LOCATION_DECK,0,1,nil)
local d3=re:IsHasCategory(CATEGORY_REMOVE) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,1-tp,LOCATION_DECK,0,1,nil)
if chk==0 then return (d1 or d2 or d3) and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c11513092.penfilter,tp,LOCATION_EXTRA,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11513093.cgop(e,tp,eg,ep,ev,re,r,rp)
......@@ -39,9 +39,9 @@ function c11513093.cgop(e,tp,eg,ep,ev,re,r,rp)
local ops={}
local opval={}
local c=e:GetHandler()
local d1=(re:IsHasCategory(CATEGORY_DRAW) or re:IsHasCategory(CATEGORY_TOHAND)) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil)
local d2=re:IsHasCategory(CATEGORY_TOGRAVE) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil)
local d3=re:IsHasCategory(CATEGORY_REMOVE) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil)
local d1=(re:IsHasCategory(CATEGORY_DRAW) or re:IsHasCategory(CATEGORY_TOHAND)) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,1-tp,LOCATION_DECK,0,1,nil)
local d2=re:IsHasCategory(CATEGORY_TOGRAVE) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,1-tp,LOCATION_DECK,0,1,nil)
local d3=re:IsHasCategory(CATEGORY_REMOVE) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=1 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,1-tp,LOCATION_DECK,0,1,nil)
if d1 then
ops[off]=aux.Stringid(11513093,0)
opval[off-1]=1
......
--光耀之精灵王 戴斯蒂娜
-- c12345687.lua
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
......@@ -36,13 +35,16 @@ function s.initial_effect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id+o*2)
e3:SetCondition(s.xyzcon)
e3:SetTarget(s.xyztg)
e3:SetOperation(s.xyzop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
end
-- Xyz Procedure Filters
......
......@@ -36,13 +36,16 @@ function s.initial_effect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+o*2)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
end
-- Xyz Procedure Filters
......@@ -76,8 +79,7 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp)
-- Additional Attach
local ag=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if ag:GetClassCount(Card.GetAttribute)>=3
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.oppattfilter),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,tp)
if ag:GetClassCount(Card.GetAttribute)>=3 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.oppattfilter),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
......
......@@ -189,6 +189,10 @@ function s.psop(e,tp,eg,ep,ev,re,r,rp)
e1:Reset()
end
function s.cfilter(c,tp,se)
return c:IsFaceup() and c:IsSummonPlayer(tp) and (c:IsLevel(9) or c:IsRace(9))
and (se==nil or c:GetReasonEffect()~=se)
end
function s.tfcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
......
......@@ -54,10 +54,10 @@ function c22023480.initial_effect(c)
end
c22023480.toss_dice=true
function c22023480.eqlimit(e,c)
return c:IsCode(22022320,22023410)
return c:IsFaceup() and (c:IsCode(22022320,22023410) or c.effect_canequip_hogu)
end
function c22023480.filter(c)
return c:IsFaceup() and c:IsCode(22022320,22023410)
return c:IsFaceup() and (c:IsCode(22022320,22023410) or c.effect_canequip_hogu)
end
function c22023480.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22023480.filter(chkc) end
......
......@@ -30,7 +30,7 @@ function c28355662.initial_effect(c)
c:RegisterEffect(e2)
end
function c28355662.excondition(e)
return Duel.GetLP(e:GetHandlerPlayer())~=3000
return Duel.GetLP(e:GetHandlerPlayer())~=4000
end
function c28355662.excost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -3,10 +3,10 @@ function c28368431.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_END_PHASE)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c28368431.cost)
--e1:SetCost(c28368431.cost)
e1:SetTarget(c28368431.target)
e1:SetOperation(c28368431.activate)
c:RegisterEffect(e1)
......
......@@ -116,7 +116,7 @@ function s.op3(e,tp,eg,ep,ev,re,r,rp)
local tc1=g1:GetFirst()
if not tc1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,s.filterc3,tp,LOCATION_EXTRA,0,1,1,tc1,e,tp,lv-tc1:GetLevel()+1,false)
local g2=Duel.SelectMatchingCard(tp,s.filterc3,tp,LOCATION_EXTRA,0,1,1,tc1,lv-tc1:GetRank()+1,e,tp,false)
g1:Merge(g2)
for tc in aux.Next(g1) do
tc:SetMaterial(nil)
......
......@@ -53,7 +53,7 @@ function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.filter1a(c,e,tp)
function s.filter1a(c)
return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD)
end
function s.op1(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -47,7 +47,7 @@ end
function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetLabel()==1 or
Duel.IsPlayerCanRemove(tp,nil,REASON_COST) and c:GetOverlayCount()>0
c:GetOverlayGroup():IsExists(Card.IsAbleToRemoveAsCost,1,nil) and c:GetOverlayCount()>0
end
if e:GetLabel()~=1 then
local g=c:GetOverlayGroup()
......@@ -59,8 +59,7 @@ end
function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return
Duel.IsPlayerCanRemove(tp,nil,REASON_COST) and Duel.IsPlayerCanDraw(tp,1)
and g:GetCount()>1
Duel.IsPlayerCanDraw(tp,1) and g:GetCount()>1
end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,nil,LOCATION_ONFIELD)
......@@ -75,7 +74,7 @@ end
function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetLabel()==1 or
Duel.IsPlayerCanRemove(tp,nil,REASON_COST) and c:GetOverlayCount()>2
c:GetOverlayGroup():IsExists(Card.IsAbleToRemoveAsCost,3,nil) and c:GetOverlayCount()>2
end
if e:GetLabel()~=1 then
local g=c:GetOverlayGroup()
......
......@@ -43,7 +43,7 @@ end
function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetLabel()==1 or
Duel.IsPlayerCanRemove(tp,nil,REASON_COST) and c:GetOverlayCount()>0
c:GetOverlayGroup():IsExists(Card.IsAbleToRemoveAsCost,1,nil) and c:GetOverlayCount()>0
end
if e:GetLabel()~=1 then
local g=c:GetOverlayGroup()
......@@ -59,9 +59,9 @@ function s.filter1(c,tp)
end
function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.filter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectTarget(tp,s.filter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil,tp):GetFirst()
local tc=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp):GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
end
......@@ -75,7 +75,7 @@ end
function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetLabel()==1 or
Duel.IsPlayerCanRemove(tp,nil,REASON_COST) and c:GetOverlayCount()>1
c:GetOverlayGroup():IsExists(Card.IsAbleToRemoveAsCost,2,nil) and c:GetOverlayCount()>1
end
if e:GetLabel()~=1 then
local g=c:GetOverlayGroup()
......
......@@ -48,7 +48,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetCondition(s.gaincon)
e1:SetTarget(s.gaintg)
......
......@@ -48,7 +48,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetCondition(s.gaincon)
e1:SetTarget(s.gaintg)
......
......@@ -48,7 +48,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetCondition(s.gaincon)
e1:SetTarget(s.gaintg)
......
--终驰管理员
local s,id,o=GetID()
function s.initial_effect(c)
--Special Summon
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCost(s.spcost)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
......@@ -33,34 +34,33 @@ function s.initial_effect(c)
e4:SetOperation(s.efop)
c:RegisterEffect(e4)
end
function s.costfilter(c)
return c:IsAbleToGraveAsCost()
function s.cfilter(c,tp,f)
return f(c) and Duel.GetMZoneCount(tp,c)>0
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,tp,Card.IsAbleToGraveAsCost)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_EXTRA)
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp,Card.IsAbleToGraveAsCost)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
if Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
local sg=g:RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
function s.thfilter(c)
return c:IsSetCard(0xc0e) and c:IsAbleToHand()
......
......@@ -45,7 +45,7 @@ function s.ovfilter_op(c)
return c:IsCanOverlay() and not c:IsType(TYPE_TOKEN)
end
function s.ovfilter_my(c)
return c:IsFaceup() and c:IsSetCard(0xc0e) and c:IsType(TYPE_XYZ)
return c:IsFaceup() and (c:IsLevel(9) or c:IsRank(9)) and c:IsType(TYPE_XYZ)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.tdfilter,tp,0,LOCATION_ONFIELD,1,nil)
......
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