Commit add63643 authored by Huangnan's avatar Huangnan

pre card update

parent 6dfa6062
Pipeline #23511 passed with stages
in 25 minutes and 38 seconds
...@@ -33,7 +33,7 @@ function s.initial_effect(c) ...@@ -33,7 +33,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.cfilter(c,tp,se) function s.cfilter(c,tp,se)
return c:IsControler(tp) and c:IsPreviousControler(tp) and c:GetOriginalAttribute()==ATTRIBUTE_FIRE return c:IsPreviousControler(tp) and c:GetOriginalAttribute()==ATTRIBUTE_FIRE
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and (se==nil or c:GetReasonEffect()~=se) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and (se==nil or c:GetReasonEffect()~=se)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -14,6 +14,7 @@ function s.initial_effect(c) ...@@ -14,6 +14,7 @@ function s.initial_effect(c)
e1:SetCondition(s.spscon) e1:SetCondition(s.spscon)
e1:SetTarget(s.spstg) e1:SetTarget(s.spstg)
e1:SetOperation(s.spsop) e1:SetOperation(s.spsop)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
...@@ -22,7 +22,7 @@ function s.initial_effect(c) ...@@ -22,7 +22,7 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+id) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.negcon) e2:SetCondition(s.negcon)
e2:SetTarget(s.negtg) e2:SetTarget(s.negtg)
e2:SetOperation(s.negop) e2:SetOperation(s.negop)
...@@ -51,7 +51,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end end
function s.desfilter(c) function s.desfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsFaceupEx()
end end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,e:GetHandler()) end
...@@ -66,4 +66,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,4 +66,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
...@@ -12,6 +12,7 @@ function s.initial_effect(c) ...@@ -12,6 +12,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.desreptg) e2:SetTarget(s.desreptg)
e2:SetValue(s.desrepval) e2:SetValue(s.desrepval)
e2:SetOperation(s.desrepop) e2:SetOperation(s.desrepop)
......
...@@ -48,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.repfilter(c,tp) function s.repfilter(c,tp)
return not c:IsReason(REASON_REPLACE) and c:IsFaceup() and c:IsSetCard(0x81) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_EFFECT) return not c:IsReason(REASON_REPLACE) and c:IsFaceup() and c:IsSetCard(0x81) and c:IsControler(tp) and c:IsReason(REASON_EFFECT)
end end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end
......
...@@ -14,7 +14,7 @@ function s.initial_effect(c) ...@@ -14,7 +14,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+id) e2:SetCountLimit(1,id+o)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetOperation(s.operation) e2:SetOperation(s.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -51,11 +51,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,11 +51,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end end
function s.mfilter(c) function s.mfilter(c,tp)
return c:IsSetCard(0x2a1) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x2a1) and c:IsType(TYPE_MONSTER) and c:IsPreviousControler(tp)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsExists(s.mfilter,1,nil) return rp==1-tp and eg:IsExists(s.mfilter,1,nil,tp)
end end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return c:IsSetCard(0x2a1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x2a1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -17,7 +17,7 @@ function s.initial_effect(c) ...@@ -17,7 +17,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e2:SetCountLimit(1,id)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(s.destg) e2:SetTarget(s.destg)
e2:SetOperation(s.desop) e2:SetOperation(s.desop)
......
...@@ -48,9 +48,9 @@ function s.lacon(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,9 +48,9 @@ function s.lacon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.latg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.latg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function s.laop(e,tp,eg,ep,ev,re,r,rp) function s.laop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -6,7 +6,7 @@ function s.initial_effect(c) ...@@ -6,7 +6,7 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
...@@ -18,6 +18,7 @@ function s.initial_effect(c) ...@@ -18,6 +18,7 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
......
...@@ -16,7 +16,7 @@ function s.initial_effect(c) ...@@ -16,7 +16,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_POSITION) e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1) e2:SetCountLimit(1,id+1)
e2:SetCondition(s.condition) e2:SetCondition(s.condition)
e2:SetTarget(s.target) e2:SetTarget(s.target)
...@@ -37,6 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,6 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil) local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.SendtoGrave(g1,REASON_EFFECT) Duel.SendtoGrave(g1,REASON_EFFECT)
end end
end end
......
...@@ -36,14 +36,13 @@ function s.filter(c) ...@@ -36,14 +36,13 @@ function s.filter(c)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) local b=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and (chkc:IsControler(tp) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and (chkc:IsControler(tp) or b) and chkc:IsCanTurnSet() end
or b) and chkc:IsCanTurnSet() end local loc2=0
local loc=0 if b then loc2=LOCATION_MZONE end
if b then loc=LOCATION_MZONE end if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,loc2,1,nil)
if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,loc,1,nil)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,loc,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,loc2,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -111,4 +111,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,4 +111,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
...@@ -46,15 +46,15 @@ function c101202002.initial_effect(c) ...@@ -46,15 +46,15 @@ function c101202002.initial_effect(c)
e4:SetOperation(c101202002.thop2) e4:SetOperation(c101202002.thop2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c101202002.cfilter1(c) function c101202002.cfilter1(c,tp)
return c:IsCode(13331639) and c:IsFaceup() return c:IsCode(13331639) and c:IsFaceup()
and Duel.IsExistingMatchingCard(c101202002.cfilter2,tp,LOCATION_MZONE,0,1,c)
end end
function c101202002.cfilter2(c) function c101202002.cfilter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end end
function c101202002.spcon(e,tp,eg,ep,ev,re,r,rp) function c101202002.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101202002.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c101202002.cfilter1,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c101202002.cfilter2,tp,LOCATION_MZONE,0,1,nil)
end end
function c101202002.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101202002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -131,7 +131,8 @@ function c101202002.thfilter2(c,tp) ...@@ -131,7 +131,8 @@ function c101202002.thfilter2(c,tp)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP)
end end
function c101202002.thcon2(e,tp,eg,ep,ev,re,r,rp) function c101202002.thcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101202002.thfilter2,1,nil,tp) and e:GetHandler():IsFaceup() local c=e:GetHandler()
return eg:IsExists(c101202002.thfilter2,1,c,tp) and not eg:IsContains(c) and c:IsFaceup()
end end
function c101202002.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) function c101202002.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return e:GetHandler():IsAbleToHand() end
......
--coded by Lyris --TG ロケット・サラマンダー
--T.G. Rocket Salamander --T.G. Rocket Salamander
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--spsummon from Deck --spsummon from Deck
......
...@@ -29,9 +29,10 @@ function c101202004.retfilter(c,e) ...@@ -29,9 +29,10 @@ function c101202004.retfilter(c,e)
and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
end end
function c101202004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101202004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED) and c101202004.retfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED) and c101202004.retfilter(chkc,e) end
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c101202004.retfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e) local g=Duel.GetMatchingGroup(c101202004.retfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
if chk==0 then return g:CheckSubGroup(aux.mzctcheck,1,#g,tp) end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and g:CheckSubGroup(aux.mzctcheck,1,#g,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=g:SelectSubGroup(tp,aux.mzctcheck,false,1,#g,tp) local tg=g:SelectSubGroup(tp,aux.mzctcheck,false,1,#g,tp)
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
......
...@@ -135,14 +135,13 @@ function c101202005.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -135,14 +135,13 @@ function c101202005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c101202005.spfilter(c,e,tp) function c101202005.spfilter(c,e,tp)
return c:IsSetCard(0x29a) and (c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) or c:IsFaceup()) return c:IsSetCard(0x29a) and c:IsFaceupEx() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101202005.thop(e,tp,eg,ep,ev,re,r,rp) function c101202005.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND) then if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND) then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c101202005.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101202005.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if ft>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101202005,3)) then if ft>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101202005,3)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -79,7 +79,7 @@ function s.rvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function s.rvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp,Card.IsAbleToGrave) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp,Card.IsAbleToGrave)
local tc=g:GetFirst() local tc=g:GetFirst()
local c=e:GetHandler() local c=e:GetHandler()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) then if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) and c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--coded by Lyris --スネークアイ・エクセル
--Snake-Eye Excel --Snake-Eye Excel
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--to hand --to hand
...@@ -52,7 +53,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,7 +53,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return c:IsSetCard(0x19c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) return c:IsSetCard(0x2a0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (e:IsCostChecked() or Duel.GetLocationCount(tp,LOCATION_MZONE)>0) if chk==0 then return (e:IsCostChecked() or Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
......
--coded by Lyris --スネークアイ・オーク
--Snake-Eye Oark --Snake-Eye Oark
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--revive --revive
...@@ -38,7 +39,10 @@ function s.rvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -38,7 +39,10 @@ function s.rvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then if tc:IsLocation(LOCATION_GRAVE) then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
else
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
end end
end end
function s.rvop(e,tp,eg,ep,ev,re,r,rp) function s.rvop(e,tp,eg,ep,ev,re,r,rp)
...@@ -61,7 +65,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,7 +65,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return c:IsSetCard(0x19c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) return c:IsSetCard(0x2a0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (e:IsCostChecked() or Duel.GetLocationCount(tp,LOCATION_MZONE)>0) if chk==0 then return (e:IsCostChecked() or Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
......
--coded by Lyris --スネークアイ・ワイトバーチ
--Snake-Eye Wight Birch --Snake-Eye Wight Birch
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--spsummon self --spsummon self
...@@ -49,7 +50,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +50,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return c:IsSetCard(0x19c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) return c:IsSetCard(0x2a0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (e:IsCostChecked() or Duel.GetLocationCount(tp,LOCATION_MZONE)>0) if chk==0 then return (e:IsCostChecked() or Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
......
--coded by Lyris --蛇眼の炎龍
--Snake-Eyes Flamberge Dragon --Snake-Eyes Flamberge Dragon
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--move --move
...@@ -41,7 +42,7 @@ end ...@@ -41,7 +42,7 @@ end
function s.filter(c,tp) function s.filter(c,tp)
local r=LOCATION_REASON_TOFIELD local r=LOCATION_REASON_TOFIELD
if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end
return (c:IsType(TYPE_MONSTER) or c:IsLocation(LOCATION_MZONE)) return (c:IsType(TYPE_MONSTER) or c:IsLocation(LOCATION_MZONE)) and c:IsFaceupEx()
and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0 and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0
end end
function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -13,9 +13,9 @@ function c101202013.initial_effect(c) ...@@ -13,9 +13,9 @@ function c101202013.initial_effect(c)
--Leave Field --Leave Field
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101202013,1)) e2:SetDescription(aux.Stringid(101202013,1))
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101202113) e2:SetCountLimit(1,101202113)
...@@ -54,6 +54,7 @@ function c101202013.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -54,6 +54,7 @@ function c101202013.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
elseif not g:FilterCount(Card.IsAbleToDeck,nil,e)==g:GetCount() then elseif not g:FilterCount(Card.IsAbleToDeck,nil,e)==g:GetCount() then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0)
end end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0)
end end
function c101202013.desop(e,tp,eg,ep,ev,re,r,rp) function c101202013.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
......
...@@ -79,9 +79,9 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,9 +79,9 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
if ct<2 then return false end if ct<2 then return false end
local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if not te then return false end if not te then return false end
local loc1=te:GetHandler():IsSetCard(0x17e) and not te:GetHandler():IsCode(id) local b1=te:GetHandler():IsSetCard(0x17e) and not te:GetHandler():IsCode(id)
local loc2=te:GetActiveType()==TYPE_TRAP and te:IsHasType(EFFECT_TYPE_ACTIVATE) local b2=te:GetActiveType()==TYPE_TRAP
return (loc1 or loc2) and p==tp and rp==1-tp return (b1 or b2) and p==tp and rp==1-tp
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -91,4 +91,4 @@ end ...@@ -91,4 +91,4 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end end
\ No newline at end of file
--ブラック・ホール・ドラゴン --ブラック・ホール・ドラゴン
--Dark Hole Dragon --Dark Hole Dragon
--coded by Lyris --coded by Lyris & Mercury233
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--effect indes --effect indes
...@@ -16,11 +16,10 @@ function s.initial_effect(c) ...@@ -16,11 +16,10 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_CUSTOM+id)
e2:SetRange(LOCATION_GRAVE+LOCATION_HAND) e2:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -34,17 +33,37 @@ function s.initial_effect(c) ...@@ -34,17 +33,37 @@ function s.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetOperation(s.regop) e3:SetOperation(s.regop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
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_DESTROY)
ge1:SetOperation(s.descheck)
Duel.RegisterEffect(ge1,0)
end
end end
function s.cfilter(c) function s.descheck(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) and not c:GetReasonEffect():IsHasProperty(EFFECT_FLAG_CARD_TARGET) local res=false
end for tc in aux.Next(eg) do
function s.spcon(e,tp,eg,ep,ev,re,r,rp) if tc:IsLocation(LOCATION_MZONE) and r&REASON_EFFECT>0 then
return eg:IsExists(s.cfilter,1,nil) if re==nil or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
res=true
break
end
local tg=Duel.GetChainInfo(Duel.GetCurrentChain(),CHAININFO_TARGET_CARDS)
if tg==nil or not tg:IsContains(tc) then
res=true
break
end
end
end
if res then Duel.RaiseEvent(eg,EVENT_CUSTOM+id,re,r,rp,tp,0) end
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -68,4 +87,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,4 +87,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
\ No newline at end of file
--coded by Lyris --幻日灯火
--UFOLight --UFOLight
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--untargetable --untargetable
......
...@@ -69,4 +69,4 @@ end ...@@ -69,4 +69,4 @@ end
function s.negop(e,tp,eg,ep,ev,re,r,rp) function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg) Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
\ No newline at end of file
--coded by Lyris --侵略的外来種-I.A.S
--Invasive Alien Species - I.A.S --Invasive Alien Species - I.A.S
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--indes --indes
...@@ -38,8 +39,8 @@ function s.initial_effect(c) ...@@ -38,8 +39,8 @@ function s.initial_effect(c)
e4:SetOperation(s.spop) e4:SetOperation(s.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e)
if aux.GetValueType(tp)=="Card" then tp=tp:GetControler() end local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_FZONE,1,nil) return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_FZONE,1,nil)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
--coded by Lyris --陀羅威
--Tarai --Tarai
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--spsummon --spsummon
...@@ -31,11 +32,9 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,11 +32,9 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
local seq=c:GetSequence() local p,seq=c:GetControler(),c:GetSequence()
if seq>4 then return false end return c:IsFaceup() and c:GetFlagEffect(id)>0 and Duel.GetMZoneCount(p,c,tp,LOCATION_REASON_TOFIELD,1<<seq)>0
if c:IsControler(1-tp) then seq=seq+16 end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,c:GetControler())
return c:IsFaceup() and c:GetFlagEffect(id)>0 and Duel.GetMZoneCount(tp,c)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,c:GetControler(),1<<seq)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end
......
...@@ -44,10 +44,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,10 +44,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(s.slim) e1:SetTarget(s.slim)
...@@ -55,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.slim(e,c,sp,st,spos,tp,se) function s.slim(e,c,sp,st,spos,tp,se)
return c:IsLocation(LOCATION_GRAVE) and not c:IsRace(RACE_ILLUSION) return c:IsLocation(LOCATION_GRAVE) and not c:IsRace(RACE_ILLUSION)
end end
\ No newline at end of file
--coded by Lyris --離世召人形
--Hanayome Ningyo --Hanayome Ningyo
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--spsummon --spsummon
...@@ -56,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.atkop(e,tp,eg,ep,ev,re,r,rp) function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-Duel.GetFieldGroup(tp,0,LOCATION_DECK) local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
if c:IsRelateToEffect(e) and c:IsFaceup() and ct>0 then if c:IsRelateToEffect(e) and c:IsFaceup() and ct>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -45,7 +45,6 @@ s.toss_coin=true ...@@ -45,7 +45,6 @@ s.toss_coin=true
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) end if chk==0 then return Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,0) Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.drop(e,tp,eg,ep,ev,re,r,rp) function s.drop(e,tp,eg,ep,ev,re,r,rp)
local heads=0 local heads=0
...@@ -58,7 +57,6 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +57,6 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.atkop(e,tp,eg,ep,ev,re,r,rp) function s.atkop(e,tp,eg,ep,ev,re,r,rp)
if ev==0 then return end if ev==0 then return end
...@@ -101,4 +99,4 @@ function s.countop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,4 +99,4 @@ function s.countop(e,tp,eg,ep,ev,re,r,rp)
c:ResetFlagEffect(id) c:ResetFlagEffect(id)
c:ResetFlagEffect(id+o) c:ResetFlagEffect(id+o)
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id+2*o,re,r,rp,ep,heads_ct) Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id+2*o,re,r,rp,ep,heads_ct)
end end
\ No newline at end of file
--coded by Lyris --霊魂鳥影-姫孔雀
--Shinobaroness Shade Peacock --Shinobaroness Shade Peacock
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -42,7 +43,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +43,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end end
function s.filter(c) function s.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and (aux.IsTypeInText(c,TYPE_SPIRIT) or c:IsCode(73055622,9553721,276357,30461781,99173029)) and c:IsAbleToHand() return c:IsType(TYPE_SPELL+TYPE_TRAP) and aux.IsTypeInText(c,TYPE_SPIRIT) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
...@@ -61,9 +62,10 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,9 +62,10 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=c:GetFlagEffectLabel(id) local ct=c:GetFlagEffectLabel(id)
local tn=Duel.GetTurnCount() local tn=Duel.GetTurnCount()
if not ct or tn==ct then return false end if not ct or tn==ct then
c:ResetFlagEffect(id) c:ResetFlagEffect(id)
return tn==ct+1 return false
else return tn==ct+1 end
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
--coded by Lyris --霊魂鳥影-彦孔雀
--Shinobaron Shade Peacock --Shinobaron Shade Peacock
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -72,9 +73,10 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,9 +73,10 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=c:GetFlagEffectLabel(id) local ct=c:GetFlagEffectLabel(id)
local tn=Duel.GetTurnCount() local tn=Duel.GetTurnCount()
if not ct or tn==ct then return false end if not ct or tn==ct then
c:ResetFlagEffect(id) c:ResetFlagEffect(id)
return tn==ct+1 return false
else return tn==ct+1 end
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -102,7 +102,7 @@ function c101202030.pop(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,7 +102,7 @@ function c101202030.pop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sc=g:Select(tp,1,1,nil):GetFirst() local sc=g:Select(tp,1,1,nil):GetFirst()
if sc and Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_EXTRA) if sc and Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_EXTRA) and sc:IsControler(tp)
and sc:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,sc)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,sc)>0
and Duel.SelectYesNo(tp,aux.Stringid(101202030,2)) then and Duel.SelectYesNo(tp,aux.Stringid(101202030,2)) then
Duel.BreakEffect() Duel.BreakEffect()
......
--coded by Lyris --地縛戒隷 ジオグレムリーナ
--Earthbound Servant Geo Gremlina --Earthbound Servant Geo Gremlina
local s, id, o = GetID() --coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
...@@ -31,7 +32,7 @@ function s.initial_effect(c) ...@@ -31,7 +32,7 @@ function s.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DAMAGE) e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o*2) e3:SetCountLimit(1,id+o*2)
...@@ -73,9 +74,9 @@ function s.dirop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,9 +74,9 @@ function s.dirop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.cfilter(c,e,tp) function s.cfilter(c,e,tp)
return c:IsFaceupEx() and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(1-tp) return c:IsFaceupEx() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(1-tp)
and c:IsReason(REASON_EFFECT) and c:GetReasonEffect():IsSetCard(0x21) and c:GetTextAttack()>0 and c:IsReason(REASON_EFFECT) and c:GetReasonEffect():GetHandler():IsSetCard(0x21)
and c:IsCanBeEffectTarget(e) and c:GetBaseAttack()>0 and c:IsCanBeEffectTarget(e) and not c:IsType(TYPE_TOKEN)
end end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(s.cfilter,nil,e,tp) local g=eg:Filter(s.cfilter,nil,e,tp)
...@@ -83,9 +84,11 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -83,9 +84,11 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tg=g:Select(tp,1,1,nil) local tg=g:Select(tp,1,1,nil)
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,tg:GetFirst():GetTextAttack()) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,tg:GetFirst():GetBaseAttack())
end end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:GetTextAttack()>0 then Duel.Damage(1-tp,tc:GetTextAttack(),REASON_EFFECT) end if tc:IsRelateToEffect(e) and tc:GetBaseAttack()>0 then
Duel.Damage(1-tp,tc:GetTextAttack(),REASON_EFFECT)
end
end end
--幻兽魔王 巴风特 --幻獣魔王バフォメット
--Berfomet the Phantom Beast Dark Ruler
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
aux.AddFusionProcFunRep(c,s.ffilter,2,true) aux.AddFusionProcFunRep(c,s.mfilter,2,true)
--change name --change name
aux.EnableChangeCode(c,4796100,LOCATION_GRAVE+LOCATION_MZONE) aux.EnableChangeCode(c,4796100,LOCATION_GRAVE+LOCATION_MZONE)
--to grave --to grave
...@@ -12,8 +14,8 @@ function s.initial_effect(c) ...@@ -12,8 +14,8 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.tgcon) e1:SetCondition(s.tgcon)
e1:SetTarget(s.tgtg) e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop) e1:SetOperation(s.tgop)
...@@ -33,44 +35,41 @@ function s.initial_effect(c) ...@@ -33,44 +35,41 @@ function s.initial_effect(c)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
RACE_ILLUSION=0x2000000 function s.mfilter(c,fc,sub,mg,sg)
function s.ffilter(c,fc,sub,mg,sg) return c:IsRace(RACE_BEAST+RACE_FIEND+RACE_ILLUSION) and (not sg
return c:IsRace(RACE_BEAST+RACE_FIEND+RACE_ILLUSION) or not sg:IsExists(Card.IsRace,1,c,c:GetRace()))
and (not sg or not sg:IsExists(Card.IsRace,1,c,c:GetRace()))
end end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp) function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function s.tgfilter(c) function s.filter(c)
return c:IsRace(RACE_BEAST+RACE_FIEND+RACE_ILLUSION) and c:IsAbleToGrave() return c:IsRace(RACE_BEAST+RACE_FIEND+RACE_ILLUSION) and c:IsAbleToGrave()
end end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp return Duel.GetTurnPlayer()==1-tp
end end
function s.filter(c,e,tp) function s.sfilter(c,e,tp)
return c:IsRace(RACE_BEAST+RACE_FIEND+RACE_ILLUSION) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_FIEND+RACE_ILLUSION)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.sfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingTarget(s.sfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,s.sfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end end
\ No newline at end of file
--coded by Lyris --熾天の騎士ガイアプロミネンス
--Gaia Prominence, the Kindling Seraph --Gaia Prominence, the Kindling Seraph
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -38,7 +39,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +39,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) return not c:IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER)
and loc&LOCATION_HAND+LOCATION_GRAVE>0 and Duel.IsChainNegatable(ev) and loc&(LOCATION_HAND|LOCATION_GRAVE)>0 and Duel.IsChainNegatable(ev)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable() return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
......
--coded by Lyris --TG マイティ・ストライカー
--T.G. Mighty Striker --T.G. Mighty Striker
local s, id, o = GetID() --coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
......
--coded by Lyris --TG オーバー・ドラグナー
--T.G. Over Dragner --T.G. Over Dragner
local s, id, o = GetID() --coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
...@@ -49,10 +50,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,10 +50,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(aux.TargetBoolFunction(aux.NOT(Card.IsSetCard),0x27)) e1:SetTarget(aux.TargetBoolFunction(aux.NOT(Card.IsSetCard),0x27))
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
......
--TG グレイヴ・ブラスター --TG グレイヴ・ブラスター
--T.G. Glaive Blaster --T.G. Glaive Blaster
--coded by Lyris --coded by Lyris
local s, id, o = GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
...@@ -21,6 +21,7 @@ function s.initial_effect(c) ...@@ -21,6 +21,7 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1)
e2:SetCondition(s.rmcon) e2:SetCondition(s.rmcon)
e2:SetTarget(s.rmtg) e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop) e2:SetOperation(s.rmop)
...@@ -75,8 +76,8 @@ function s.sfilter(c,e,tp) ...@@ -75,8 +76,8 @@ function s.sfilter(c,e,tp)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(s.sfilter,nil,e,tp) local g=eg:Filter(s.sfilter,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 end if chkc then return g:IsContains(chkc) end
if chk==0 then return #g>0 end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
...@@ -85,4 +86,4 @@ end ...@@ -85,4 +86,4 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) end if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) end
end end
\ No newline at end of file
...@@ -34,7 +34,7 @@ end ...@@ -34,7 +34,7 @@ end
function c101202037.spfilter(c,e,tp) function c101202037.spfilter(c,e,tp)
return c:IsType(TYPE_TUNER) and c:IsLevel(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_TUNER) and c:IsLevel(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101202037.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101202037.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101202037.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101202037.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101202037.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c101202037.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
--装甲超量鱼雷 --エクシーズ・アーマー・トルピード
--Script by Dio0
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--xyz summon --xyz summon
...@@ -21,7 +22,6 @@ function s.initial_effect(c) ...@@ -21,7 +22,6 @@ function s.initial_effect(c)
e2:SetTarget(s.drawtarget) e2:SetTarget(s.drawtarget)
e2:SetOperation(s.drawoperation) e2:SetOperation(s.drawoperation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--actlimit --actlimit
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
...@@ -48,17 +48,13 @@ function s.initial_effect(c) ...@@ -48,17 +48,13 @@ function s.initial_effect(c)
e5:SetValue(aux.tgoval) e5:SetValue(aux.tgoval)
e5:SetCondition(s.targetcon) e5:SetCondition(s.targetcon)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function s.targetcon(e) function s.targetcon(e)
return e:GetHandler():GetEquipTarget():IsType(TYPE_XYZ) return e:GetHandler():GetEquipTarget():IsType(TYPE_XYZ)
end end
function s.attcon(e) function s.attcon(e)
return e:GetHandler():GetOverlayCount()==0 return e:GetHandler():GetOverlayCount()==0
end end
function s.drawcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.drawcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
...@@ -73,12 +69,10 @@ function s.drawoperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,12 +69,10 @@ function s.drawoperation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function s.actcon(e) function s.actcon(e)
local tc=e:GetHandler():GetEquipTarget() local tc=e:GetHandler():GetEquipTarget()
return Duel.GetAttacker()==tc or Duel.GetAttackTarget()==tc return Duel.GetAttacker()==tc or Duel.GetAttackTarget()==tc
end end
function s.disfilter(c) function s.disfilter(c)
return aux.NegateAnyFilter(c) and c:IsType(TYPE_MONSTER) and c:IsFaceup() return aux.NegateAnyFilter(c) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end end
......
--装甲超量要塞 --エクシーズ・アーマー・フォートレス
--Script by Dio0
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--xyz summon --xyz summon
...@@ -31,11 +32,9 @@ function s.initial_effect(c) ...@@ -31,11 +32,9 @@ function s.initial_effect(c)
e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.damcon(e) function s.damcon(e)
return e:GetHandler():GetEquipTarget():GetBattleTarget()~=nil return e:GetHandler():GetEquipTarget():GetBattleTarget()~=nil
end end
function s.ovfilter(c) function s.ovfilter(c)
return c:IsFaceup() and (c:IsRank(3) or c:IsRank(4)) return c:IsFaceup() and (c:IsRank(3) or c:IsRank(4))
end end
...@@ -43,13 +42,11 @@ function s.xyzop(e,tp,chk) ...@@ -43,13 +42,11 @@ function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function s.xyzcondition(e) function s.xyzcondition(e)
return e:GetHandler():GetOverlayCount() > 0 return e:GetHandler():GetOverlayCount() > 0
end end
function s.thfilter(c) function s.thfilter(c)
return (c:IsSetCard(0x4073) or c:IsCode(73046708)) and c:IsAbleToHand() return c:IsSetCard(0x4073) and c:IsAbleToHand()
end end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
...@@ -69,16 +66,14 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -69,16 +66,14 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,ct,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,ct,tp,LOCATION_DECK)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
local ct=e:GetLabel()
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,ct,ct,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local ct=e:GetLabel()
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if sg:GetCount()>0 then local sg=g:SelectSubGroup(tp,aux.dncheck,false,ct,ct)
if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
end end
end end
...@@ -49,7 +49,7 @@ end ...@@ -49,7 +49,7 @@ end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x73) and c:IsAbleToHand() return c:IsSetCard(0x73) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
...@@ -92,4 +92,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,4 +92,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Overlay(c,tg) Duel.Overlay(c,tg)
end end
end end
end end
\ No newline at end of file
...@@ -18,7 +18,7 @@ function s.initial_effect(c) ...@@ -18,7 +18,7 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(s.lscon) e1:SetCondition(s.lscon)
e1:SetOperation(s.lsop) e1:SetOperation(s.lsop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -30,7 +30,7 @@ function s.initial_effect(c) ...@@ -30,7 +30,7 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1) e2:SetTargetRange(1,1)
e2:SetCondition(s.lecon) e2:SetCondition(s.lecon)
e2:SetTarget(s.letg) e2:SetValue(s.aclimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -48,10 +48,16 @@ function Auxiliary.XyzAlterFilter(c,alterf,xyzc,e,tp,alterop) ...@@ -48,10 +48,16 @@ function Auxiliary.XyzAlterFilter(c,alterf,xyzc,e,tp,alterop)
return alterf(c,e,tp,xyzc) and c:IsCanBeXyzMaterial(xyzc) and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0 return alterf(c,e,tp,xyzc) and c:IsCanBeXyzMaterial(xyzc) and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0
and Auxiliary.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and (not alterop or alterop(e,tp,0,c)) and Auxiliary.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and (not alterop or alterop(e,tp,0,c))
end end
function s.chkfilter(c,tp)
return c:IsSummonPlayer(1-tp) and c:IsSummonLocation(LOCATION_EXTRA)
end
function s.chk(e,tp,eg) function s.chk(e,tp,eg)
for p=0,1 do for p=0,1 do
if eg:IsExists(Card.IsSummonPlayer,1,nil,1-p) then if eg:IsExists(s.chkfilter,1,nil,p) then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,2) Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(p,id)>1 then
Duel.RegisterFlagEffect(p,id+o,RESET_PHASE+PHASE_END,0,2)
end
end end
end end
end end
...@@ -60,7 +66,7 @@ function s.mfilter(c,e,tp) ...@@ -60,7 +66,7 @@ function s.mfilter(c,e,tp)
return g and #g>0 and g:IsContains(c) return g and #g>0 and g:IsContains(c)
end end
function s.altop(e,tp,chk) function s.altop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)>1 end if chk==0 then return Duel.GetFlagEffect(tp,id+o)>0 end
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
end end
function s.lscon(e,tp,eg,ep,ev,re,r,rp) function s.lscon(e,tp,eg,ep,ev,re,r,rp)
...@@ -68,22 +74,20 @@ function s.lscon(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,22 +74,20 @@ function s.lscon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.lsop(e,tp,eg,ep,ev,re,r,rp) function s.lsop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetDescription(aux.Stringid(id,3))
e2:SetCode(EFFECT_CANNOT_SUMMON) e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function s.lecon(e,tp,eg,ep,ev,re,r,rp) function s.lecon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function s.letg(e,te) function s.aclimit(e,te,tp)
return te:IsActiveType(TYPE_MONSTER) and te:GetHandler():IsAttackAbove(3000) return te:IsActiveType(TYPE_MONSTER) and te:GetHandler():IsAttackAbove(3000)
end end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -100,4 +104,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,4 +104,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
\ No newline at end of file
--coded by Lyris --奇跡の魔導剣士
--Exceed the Pendulum --Exceed the Pendulum
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -42,10 +43,10 @@ function s.gchk(g) ...@@ -42,10 +43,10 @@ function s.gchk(g)
return g:IsExists(Card.IsType,1,nil,TYPE_PENDULUM) return g:IsExists(Card.IsType,1,nil,TYPE_PENDULUM)
end end
function s.afilter(c) function s.afilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) return c:IsFaceup() and c:GetOriginalType()&TYPE_PENDULUM~=0
end end
function s.val(e,c) function s.val(e,c)
return Duel.GetMatchingGroupCount(s.afilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*100 return Duel.GetMatchingGroupCount(s.afilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*100
end end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
......
--S:Pリトルナイト --S:Pリトルナイト
--S:P Little Night --S:P Little Night
--coded by Lyris --coded by Lyris
local s, id, o = GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
...@@ -68,17 +68,21 @@ end ...@@ -68,17 +68,21 @@ end
function s.drmcon(e,tp,eg,ep,ev,re,r,rp) function s.drmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp return rp==1-tp
end end
function s.cfilter(c,tp) function s.cfilter1(c,tp)
return c:IsAbleToRemove() and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) return c:IsFaceup() and c:IsAbleToRemove()
and Duel.IsExistingTarget(s.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function s.cfilter2(c)
return c:IsFaceup() and c:IsAbleToRemove()
end end
function s.drmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.drmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingTarget(s.cfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,s.cfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g) local g2=Duel.SelectTarget(tp,s.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g)
g:Merge(sg) g:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
end end
function s.drmop(e,tp,eg,ep,ev,re,r,rp) function s.drmop(e,tp,eg,ep,ev,re,r,rp)
...@@ -116,4 +120,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -116,4 +120,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(g) do for tc in aux.Next(g) do
Duel.ReturnToField(tc) Duel.ReturnToField(tc)
end end
end end
\ No newline at end of file
...@@ -72,6 +72,7 @@ function c101202047.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,6 +72,7 @@ function c101202047.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c101202047.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c101202047.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetCode()) e:SetLabel(g:GetFirst():GetCode())
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
...@@ -143,7 +144,7 @@ function c101202047.pop(e,tp,eg,ep,ev,re,r,rp) ...@@ -143,7 +144,7 @@ function c101202047.pop(e,tp,eg,ep,ev,re,r,rp)
tg=tg:Filter(aux.PConditionExtraFilterSpecific,nil,e,tp,lscale,rscale,e1) tg=tg:Filter(aux.PConditionExtraFilterSpecific,nil,e,tp,lscale,rscale,e1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.GCheckAdditional=aux.PendOperationCheck(ft1,ft2,ft) aux.GCheckAdditional=aux.PendOperationCheck(ft1,ft2,ft)
local g=tg:SelectSubGroup(tp,aux.TRUE,true,1,math.min(#tg,ft)) local g=tg:SelectSubGroup(tp,aux.TRUE,false,1,math.min(#tg,ft))
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
if not g then if not g then
e1:Reset() e1:Reset()
......
--TG-ブレイクリミッター --TG-ブレイクリミッター
--T.G. - Break Limiter --T.G. - Break Limiter
--coded by Lyris --coded by Lyris
local s, id, o = GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -68,4 +68,4 @@ function s.rtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,4 +68,4 @@ function s.rtop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end else Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end
end end
\ No newline at end of file
--coded by Lyris --TG-オールクリア
--T.G. - All Clear --T.G. - All Clear
local s, id, o = GetID() --coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -81,4 +81,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,4 +81,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnCount()~=e:GetLabel()+1 then return end if Duel.GetTurnCount()~=e:GetLabel()+1 then return end
Duel.Hint(HINT_CARD,0,id) Duel.Hint(HINT_CARD,0,id)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end end
\ No newline at end of file
--coded by Lyris --蛇眼神殿スネークアイ
--The Shrine of Serpentine Sight - Snake-Eye --The Shrine of Serpentine Sight - Snake-Eye
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
...@@ -25,7 +26,7 @@ function s.initial_effect(c) ...@@ -25,7 +26,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(s.spcon) e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
...@@ -36,11 +37,11 @@ function s.initial_effect(c) ...@@ -36,11 +37,11 @@ function s.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.filter(c,tp) function s.filter(c,tp)
return c:IsSetCard(0x19c) and c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp)>0 return c:IsSetCard(0x2a0) and c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp)>0
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,tp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,nil,tp)
if #g==0 or not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,1)) then return end if #g==0 or not Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
......
...@@ -77,4 +77,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,4 +77,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoDeck(rc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) Duel.SendtoDeck(rc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end end
end end
\ No newline at end of file
--coded by Lyris --ファイヤー・バック
--Fire Recovery --Fire Recovery
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
...@@ -30,7 +31,7 @@ function s.filter(c,e,tp) ...@@ -30,7 +31,7 @@ function s.filter(c,e,tp)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,e:GetHandler())
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -40,6 +41,8 @@ end ...@@ -40,6 +41,8 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if Duel.DiscardHand(tp,Card.IsAbleToGrave,1,1,REASON_EFFECT)<1 then return end if Duel.DiscardHand(tp,Card.IsAbleToGrave,1,1,REASON_EFFECT)<1 then return end
local gc=Duel.GetOperatedGroup():GetFirst()
if not gc:IsLocation(LOCATION_GRAVE) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end end
......
--coded by Lyris --シンクロ・ランブル
--Synchro Rumble --Synchro Rumble
local s, id, o = GetID() --coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,63436931) aux.AddCodeList(c,63436931)
--Activate --Activate
...@@ -25,7 +26,7 @@ function s.initial_effect(c) ...@@ -25,7 +26,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsType(TYPE_TUNER) or (c:IsLevel(7,8) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO)) return (c:IsType(TYPE_TUNER) or c:IsLevel(7,8) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -40,12 +41,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,12 +41,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(s.limit) e1:SetTarget(s.limit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function s.limit(e,c) function s.limit(e,c)
......
--coded by Lyris --星逢の神籬
--The Himorogi where Stars Align --The Himorogi where Stars Align
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
...@@ -35,7 +36,7 @@ function s.mfilter(c,tp) ...@@ -35,7 +36,7 @@ function s.mfilter(c,tp)
return (c:IsType(TYPE_SPIRIT) or c:IsCode(25415053)) and c:IsLocation(LOCATION_MZONE) return (c:IsType(TYPE_SPIRIT) or c:IsCode(25415053)) and c:IsLocation(LOCATION_MZONE)
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsPreviousControler(tp) return c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_WIND)~=0 and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
...@@ -51,7 +52,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,7 +52,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil) local b2=Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,{b1,1190},{b2,1159}) local op=aux.SelectFromOptions(tp,{b1,1190},{b2,1153})
if op==1 then if op==1 then
e:SetCategory(CATEGORY_TOHAND) e:SetCategory(CATEGORY_TOHAND)
e:SetOperation(s.retrieve) e:SetOperation(s.retrieve)
......
...@@ -42,13 +42,13 @@ function s.sfilter2(c,e,tp,oc) ...@@ -42,13 +42,13 @@ function s.sfilter2(c,e,tp,oc)
and aux.gfcheck(Group.FromCards(c,oc),Card.IsSetCard,0x196,0x29d) and aux.gfcheck(Group.FromCards(c,oc),Card.IsSetCard,0x196,0x29d)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_HAND,0,1,nil) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_HAND,0,nil)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and g:IsExists(s.sfilter1,1,nil,e,tp,g) end and g:IsExists(s.sfilter1,1,nil,e,tp,g) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,PLAYER_ALL,LOCATION_DECK+LOCATION_EXTRA+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,PLAYER_ALL,LOCATION_DECK+LOCATION_EXTRA+LOCATION_HAND)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_HAND,0,1,nil) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_HAND,0,nil)
if not Duel.IsPlayerAffectedByEffect(tp,59822133) and g:IsExists(s.sfilter1,1,nil,e,tp,g) then if not Duel.IsPlayerAffectedByEffect(tp,59822133) and g:IsExists(s.sfilter1,1,nil,e,tp,g) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2))
local sc=g:FilterSelect(tp,s.sfilter1,1,1,nil,e,tp,g):GetFirst() local sc=g:FilterSelect(tp,s.sfilter1,1,1,nil,e,tp,g):GetFirst()
......
--coded by Lyris --天子の指輪
--Angel Ring --Angel Ring
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
......
--coded by Lyris --カードスキャナー
--Card Scanner --Card Scanner
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
...@@ -31,7 +32,7 @@ function s.initial_effect(c) ...@@ -31,7 +32,7 @@ function s.initial_effect(c)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_DECK,1,nil) end and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_DECK,1,nil,1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
Duel.SetTargetParam(Duel.AnnounceType(tp)) Duel.SetTargetParam(Duel.AnnounceType(tp))
end end
...@@ -39,12 +40,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,12 +40,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 or Duel.GetFieldGroup(tp,0,LOCATION_DECK)==0 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 or Duel.GetFieldGroup(tp,0,LOCATION_DECK)==0 then return end
local sc=Duel.GetFieldCard(tp,LOCATION_DECK,0) local sc=Duel.GetFieldCard(tp,LOCATION_DECK,0)
local oc=Duel.GetFieldCard(1-tp,LOCATION_DECK,0) local oc=Duel.GetFieldCard(1-tp,LOCATION_DECK,0)
Duel.ConfirmCards(tp,sc)
Duel.ConfirmCards(1-tp,sc) Duel.ConfirmCards(1-tp,sc)
Duel.ConfirmCards(tp,oc) Duel.ConfirmCards(tp,oc)
Duel.ConfirmCards(1-tp,oc)
local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if sc:IsType(1<<op) then Duel.SendtoHand(sc,nil,REASON_EFFECT) if sc:IsType(1<<op) then Duel.SendtoHand(sc,nil,REASON_EFFECT)
else Duel.MoveSequence(sc,SEQ_DECKTOP) end else Duel.MoveSequence(sc,SEQ_DECKTOP) end
if oc:IsType(1<<op) then Duel.SendtoHand(oc,nil,REASON_EFFECT) if oc:IsType(1<<op) then Duel.SendtoHand(oc,nil,REASON_EFFECT,1-tp)
else Duel.MoveSequence(oc,SEQ_DECKTOP) end else Duel.MoveSequence(oc,SEQ_DECKTOP) end
end end
function s.tdcon(e,tp,eg,ep,ev,re,r,rp) function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
......
--coded by Lyris --不死武士の悼み
--Lament of the Immortal Bushi --Lament of the Immortal Bushi
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
...@@ -28,11 +29,11 @@ function s.initial_effect(c) ...@@ -28,11 +29,11 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
if chk==0 then return #g>0 end if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -16,7 +16,7 @@ function c101202069.initial_effect(c) ...@@ -16,7 +16,7 @@ function c101202069.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c101202069.rfilter(c,tp) function c101202069.rfilter(c,tp)
return c:GetBaseAttack()==2500 and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() return c:GetBaseAttack()==2500 and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_PENDULUM)
end end
function c101202069.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c101202069.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101202069.rfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,c101202069.rfilter,1,nil,tp) end
......
--coded by Lyris --TG-クローズ
--T.G. - Close --T.G. - Close
local s, id, o = GetID() --coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--重铠装超量 --フル・アーマード・エクシーズ
--Script by Dio0
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--activate --activate
...@@ -28,12 +29,11 @@ end ...@@ -28,12 +29,11 @@ end
function s.xyzfilter(c) function s.xyzfilter(c)
return c:IsXyzSummonable(nil) return c:IsXyzSummonable(nil)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
function s.xyzcond(e,tp,eg,ep,ev,re,r,rp,chk) function s.xyzcond(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
...@@ -47,12 +47,11 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,12 +47,11 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
Duel.XyzSummon(tp,tg:GetFirst(),nil) Duel.XyzSummon(tp,tg:GetFirst(),nil)
end end
end end
function s.tgfilter(c,tp) function s.tgfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c) return c:IsFaceup() and c:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c)
end end
function s.eqfilter(c,tp) function s.eqfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:CheckUniqueOnField(tp) and not c:IsForbidden() return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end
...@@ -60,18 +59,17 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -60,18 +59,17 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
return ft>0 and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end return ft>0 and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local tg=Duel.GetTargetsRelateToChain() local tc=Duel.GetTargetsRelateToChain():GetFirst()
local tc=tg:Filter(Card.IsLocation,nil,LOCATION_MZONE):GetFirst() if not tc then return end
local ec=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,tc,tp):GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
if tc and ec and ec:CheckUniqueOnField(tp) and not ec:IsForbidden() then local ec=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,tc,tp):GetFirst()
if not Duel.Equip(tp,ec,tc) then return end if ec and Duel.Equip(tp,ec,tc)then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
...@@ -80,17 +78,17 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,17 +78,17 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(s.eqlimit) e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1) ec:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) --
local e2=Effect.CreateEffect(ec)
e2:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(ec:GetAttack()) e2:SetValue(ec:GetAttack())
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e2) ec:RegisterEffect(e2,true)
--substitute --substitute
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(ec)
e3:SetType(EFFECT_TYPE_EQUIP) e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) e3:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(s.desrepval) e3:SetValue(s.desrepval)
ec:RegisterEffect(e3,true) ec:RegisterEffect(e3,true)
......
...@@ -45,6 +45,7 @@ function c101202073.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,6 +45,7 @@ function c101202073.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=g:GetFirst() local rc=g:GetFirst()
if rc:IsType(TYPE_TOKEN) then return end if rc:IsType(TYPE_TOKEN) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101202073,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
...@@ -66,8 +67,10 @@ function c101202073.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,8 +67,10 @@ function c101202073.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c101202073.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,c101202073.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then
local fid=tc:GetFieldID()
tc:RegisterFlagEffect(101202073,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) tc:RegisterFlagEffect(101202073,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101202073,3))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......
--coded by Lyris --裏切りの罪宝-シルウィア
--Tainted Treasure of Betrayal - Silvia --Tainted Treasure of Betrayal - Silvia
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
...@@ -29,7 +30,7 @@ function s.initial_effect(c) ...@@ -29,7 +30,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.filter(c,tp) function s.filter(c,tp)
return c:IsFaceupEx() and c:IsSetCard(0x19b) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() return c:IsFaceupEx() and c:IsSetCard(0x29f) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -39,11 +40,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,11 +40,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end local c=e:GetHandler()
if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) and c~=chkc end
if chk==0 then return e:IsCostChecked() if chk==0 then return e:IsCostChecked()
or Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end or Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -21,9 +21,12 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -21,9 +21,12 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)>1 return Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)>1
end end
function s.mfilter(c,tp,ft) function s.mfilter(c,tp,ft)
if not (c:IsFaceupEx() and c:GetOriginalType()&TYPE_MONSTER>0) then return false end
local p=c:GetOwner()
if p~=tp then ft=0 end
local r=LOCATION_REASON_TOFIELD local r=LOCATION_REASON_TOFIELD
if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end if not c:IsControler(p) then r=LOCATION_REASON_CONTROL end
return c:GetOriginalType()&TYPE_MONSTER>0 and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0 return Duel.GetLocationCount(p,LOCATION_SZONE,tp,r)>ft
end end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return c:GetOriginalType()&TYPE_MONSTER>0 and c:GetType()&TYPE_CONTINUOUS+TYPE_SPELL==TYPE_CONTINUOUS+TYPE_SPELL return c:GetOriginalType()&TYPE_MONSTER>0 and c:GetType()&TYPE_CONTINUOUS+TYPE_SPELL==TYPE_CONTINUOUS+TYPE_SPELL
...@@ -46,7 +49,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -46,7 +49,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetCategory(0) e:SetCategory(0)
e:SetOperation(s.mvop) e:SetOperation(s.mvop)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.mfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp,ft) Duel.SelectTarget(tp,s.mfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp,0)
else else
e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetOperation(s.spop) e:SetOperation(s.spop)
...@@ -71,4 +74,4 @@ end ...@@ -71,4 +74,4 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end end
\ No newline at end of file
...@@ -31,6 +31,7 @@ function s.initial_effect(c) ...@@ -31,6 +31,7 @@ function s.initial_effect(c)
e3:SetHintTiming(0,TIMING_END_PHASE) e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e3:SetCondition(s.effcon)
e3:SetCost(s.effcost) e3:SetCost(s.effcost)
e3:SetOperation(s.changeop) e3:SetOperation(s.changeop)
e3:SetLabel(2) e3:SetLabel(2)
...@@ -44,6 +45,7 @@ function s.initial_effect(c) ...@@ -44,6 +45,7 @@ function s.initial_effect(c)
e4:SetHintTiming(0,TIMING_END_PHASE) e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,id) e4:SetCountLimit(1,id)
e4:SetCondition(s.effcon)
e4:SetCost(s.effcost) e4:SetCost(s.effcost)
e4:SetTarget(s.tgtg) e4:SetTarget(s.tgtg)
e4:SetOperation(s.tgop) e4:SetOperation(s.tgop)
...@@ -61,7 +63,7 @@ function s.rmfilter(c) ...@@ -61,7 +63,7 @@ function s.rmfilter(c)
end end
function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel() local ct=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_EXTRA,0,ct,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_EXTRA,0,ct,ct,nil) local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_EXTRA,0,ct,ct,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_COST) Duel.Remove(g,POS_FACEDOWN,REASON_COST)
...@@ -105,14 +107,10 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -105,14 +107,10 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local res=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) local tc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if g:GetCount()>0 then if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
res=Duel.SendtoGrave(g,REASON_EFFECT) local dg=Duel.GetMatchingGroup(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,nil)
end
local dg=Duel.GetMatchingGroup(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,nil)
if #dg>0 and res~=0 then
local dc=dg:GetFirst() local dc=dg:GetFirst()
while dc do while dc do
Duel.NegateRelatedChain(dc,RESET_TURN_SET) Duel.NegateRelatedChain(dc,RESET_TURN_SET)
...@@ -130,4 +128,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -130,4 +128,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
dc=dg:GetNext() dc=dg:GetNext()
end end
end end
end end
\ No newline at end of file
--coded by Lyris --星宵竜転
--Seishou Ruten --Seishou Ruten
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
...@@ -34,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local f=aux.FALSE local f=aux.FALSE
local typ=tc:GetType()&TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK local typ=tc:GetType()&TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK
if typ==TYPE_FUSION then f=aux.FilterEqualFunction(Card.GetAttribute,tc:GetAttribute()) if typ==TYPE_FUSION then f=aux.FilterEqualFunction(Card.GetAttribute,tc:GetAttribute())
elseif typ==TYPE_SYNCHRO then f=aux.FilterBoolFunction(Card.IsLevelBelow,tc:GetLevel()) elseif typ==TYPE_SYNCHRO then f=aux.FilterBoolFunction(Card.IsLevelBelow,tc:GetLevel()-1)
elseif typ==TYPE_XYZ then f=aux.FilterBoolFunction(Card.IsLevel,tc:GetRank()) elseif typ==TYPE_XYZ then f=aux.FilterBoolFunction(Card.IsLevel,tc:GetRank())
elseif typ==TYPE_LINK then f=aux.FilterEqualFunction(Card.GetRace,tc:GetRace()) end elseif typ==TYPE_LINK then f=aux.FilterEqualFunction(Card.GetRace,tc:GetRace()) end
local g=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp,f) local g=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp,f)
......
--coded by Lyris --エスケープ・ゴート
--Escapegoat --Escapegoat
--coded by Lyris
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -36,12 +37,12 @@ function s.tkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,12 +37,12 @@ function s.tkcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(s.tfilter,1,nil,tp) return g and g:IsExists(s.tfilter,1,nil,tp)
end end
function s.cfilter(c) function s.cfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 return Duel.GetMZoneCount(tp,c)>0
end end
function s.tkcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil) end if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil) local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -66,7 +67,7 @@ function s.rfilter(c,e) ...@@ -66,7 +67,7 @@ function s.rfilter(c,e)
end end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.filter,1,nil,e) and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_ONFIELD,0,1,nil,e) end if chk==0 then return eg:IsExists(s.filter,1,nil,e) and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_ONFIELD,0,1,nil,e) end
if Duel.SelectEffectYesNo(tp,c,96) then if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local tc=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e):GetFirst() local tc=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e):GetFirst()
e:SetLabelObject(tc) e:SetLabelObject(tc)
......
...@@ -12,6 +12,7 @@ function s.initial_effect(c) ...@@ -12,6 +12,7 @@ function s.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.dmgcon) e1:SetCondition(s.dmgcon)
e1:SetTarget(s.damtg) e1:SetTarget(s.damtg)
e1:SetOperation(s.dmgop) e1:SetOperation(s.dmgop)
......
...@@ -174,6 +174,6 @@ function s.op5(e,tp,eg,ep,ev,re,r,rp) ...@@ -174,6 +174,6 @@ function s.op5(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.filter5,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter5,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g:GetFirst(),nil,REASON_EFFECT) Duel.SendtoHand(g:GetFirst(),nil,REASON_EFFECT)
Duel.ShuffleDeck(tp) Duel.ConfirmCards(1-tp,g)
end end
end 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