Commit 7486d2f7 authored by POLYMER's avatar POLYMER

fix

parent 482f06f9
No preview for this file type
......@@ -177,8 +177,13 @@ end
function c28318027.rcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local tc=Duel.SelectMatchingCard(tp,c28318027.rcfilter,tp,LOCATION_MZONE,0,1,1,nil,c:GetRank()):GetFirst()
if not tc then return end
local g=Duel.GetMatchingGroup(c28318027.rcfilter,tp,LOCATION_MZONE,0,nil,c:GetRank())
if #g==0 then return end
local tc=g:GetFirst()
if #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
tc=g:Select(tp,1,1,nil):GetFirst()
end
Duel.HintSelection(Group.FromCards(tc))
if Duel.SelectOption(tp,aux.Stringid(28318027,3),aux.Stringid(28318027,4))==0 then
local e1=Effect.CreateEffect(c)
......
......@@ -18,8 +18,7 @@ function c28322413.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c28322413.tdcon)
e1:SetCost(c28322413.tdcost)
e1:SetTarget(c28322413.tdtg)
......@@ -90,8 +89,9 @@ function c28322413.Operation(f,gf,minct,maxct)
end
c:SetMaterial(mg)
c:RegisterFlagEffect(28322413,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1,mg:GetFirst():GetLevel())
local check=mg:GetClassCount(Card.GetLevel)==1
Duel.Overlay(c,mg)
if mg:GetClassCount(Card.GetLevel)==1 then
if check then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......
......@@ -90,8 +90,9 @@ function c28366684.Operation(f,gf,minct,maxct)
end
c:SetMaterial(mg)
c:RegisterFlagEffect(28366684,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1,mg:GetFirst():GetLevel())
local check=mg:GetClassCount(Card.GetLevel)==1
Duel.Overlay(c,mg)
if mg:GetClassCount(Card.GetLevel)==1 then
if check then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......
......@@ -83,6 +83,7 @@ end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetLabel()
local te=e:GetLabelObject()
Duel.ConfirmDecktop(tp,1)
Duel.DiscardDeck(tp,1,REASON_EFFECT)
local tc=Duel.GetOperatedGroup():GetFirst()
if tc then
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCondition(cm.con)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
......@@ -15,7 +15,7 @@ end
function cm.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
return ct==0 or ct==Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)
end
......
......@@ -37,7 +37,7 @@ function s.spfilter(c,e,tp)
return c.hackclad==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
end
function s.thfilter(c)
return _G["c"..c:GetCode()] and _G["c"..c:GetCode()].hackclad and not c:IsCode(id) and c:IsAbleToHand()
......@@ -106,8 +106,10 @@ function s.mvalue(e,fp,rp,r)
return 1-Duel.GetFieldGroupCount(fp,LOCATION_SZONE,0)
end
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -17,6 +17,7 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e2:SetCountLimit(1,id)
e2:SetCost(s.drcost)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
......
......@@ -53,6 +53,9 @@ function c91300031.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c91300031.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function c91300031.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -4,27 +4,14 @@ function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetCondition(s.checkcon)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_REMOVE)
Duel.RegisterEffect(ge2,0)
end
--sno0
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
......@@ -46,17 +33,6 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
s.hackclad=2
function s.checkcon(e,tp,eg,ep,ev,re,r,rp)
return not re or not re:IsActivated()
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1-tp,id,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function s.spfilter(c,e,tp)
return c.hackclad==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......@@ -76,7 +52,7 @@ function s.drfilter2(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)>=3
return #eg>=2
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
......
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