Commit ad4b4a3f authored by VanillaSalt's avatar VanillaSalt

new

parent 4b6092a9
...@@ -21,7 +21,7 @@ function c14735698.initial_effect(c) ...@@ -21,7 +21,7 @@ function c14735698.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c14735698.filter(c,e,tp,m) function c14735698.filter(c,e,tp,m)
if not c:IsSetCard(0xb4) or not c:IsType(TYPE_RITUAL) if not c:IsSetCard(0xb4) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) then return false end or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) then return false end
local mg=nil local mg=nil
if c.mat_filter then if c.mat_filter then
......
--修験の妖社
function c27918963.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c27918963.ctcon)
e2:SetOperation(c27918963.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--counter
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(27918963,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,27918963)
e4:SetTarget(c27918963.target)
e4:SetOperation(c27918963.operation)
c:RegisterEffect(e4)
end
function c27918963.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c27918963.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c27918963.cfilter,1,nil)
end
function c27918963.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x33,1)
end
function c27918963.filter1(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c27918963.filter2(c)
return c:IsSetCard(0xb3) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c27918963.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=e:GetHandler():IsCanRemoveCounter(tp,0x33,1,REASON_COST)
and Duel.IsExistingMatchingCard(c27918963.filter1,tp,LOCATION_MZONE,0,1,nil)
local b2=e:GetHandler():IsCanRemoveCounter(tp,0x33,3,REASON_COST)
and Duel.IsExistingMatchingCard(c27918963.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(27918963,1),aux.Stringid(27918963,2))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(27918963,1))
else
op=Duel.SelectOption(tp,aux.Stringid(27918963,2))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_ATKCHANGE)
e:GetHandler():RemoveCounter(tp,0x33,1,REASON_COST)
else
e:SetCategory(CATEGORY_TOHAND)
e:GetHandler():RemoveCounter(tp,0x33,3,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
end
function c27918963.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if e:GetLabel()==0 then
local g=Duel.GetMatchingGroup(c27918963.filter1,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c27918963.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--妖仙獣 鎌参太刀
function c28630501.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(28630501,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c28630501.sumtg)
e1:SetOperation(c28630501.sumop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(28630501,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,28630501)
e2:SetCondition(c28630501.thcon)
e2:SetTarget(c28630501.thtg)
e2:SetOperation(c28630501.thop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(c28630501.regop)
c:RegisterEffect(e3)
end
function c28630501.filter(c)
return c:IsSetCard(0xb3) and not c:IsCode(28630501) and c:IsSummonable(true,nil)
end
function c28630501.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28630501.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c28630501.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c28630501.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
function c28630501.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsControler(tp) and tc:IsSetCard(0xb3) and tc~=e:GetHandler()
end
function c28630501.thfilter(c)
return c:IsSetCard(0xb3) and not c:IsCode(28630501) and c:IsAbleToHand()
end
function c28630501.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28630501.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c28630501.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c28630501.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c28630501.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(28630501,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c28630501.rettg)
e1:SetOperation(c28630501.retop)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c28630501.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c28630501.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--妖仙獣 閻魔巳裂
function c39853199.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(39853199,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarget(c39853199.destg1)
e1:SetOperation(c39853199.desop1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(39853199,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c39853199.descon2)
e2:SetTarget(c39853199.destg2)
e2:SetOperation(c39853199.desop2)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(c39853199.regop)
c:RegisterEffect(e3)
end
function c39853199.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsFaceup() and tc:IsAttribute(0xff-ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function c39853199.desop1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c39853199.descon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM
end
function c39853199.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c39853199.desop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c39853199.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(39853199,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c39853199.rettg)
e1:SetOperation(c39853199.retop)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c39853199.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c39853199.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
...@@ -36,13 +36,17 @@ function c43455065.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,13 +36,17 @@ function c43455065.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(0,LOCATION_ONFIELD) e1:SetTargetRange(0,LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTarget(c43455065.indtg) e1:SetTarget(c43455065.indtg)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetTargetRange(0,LOCATION_MZONE)
Duel.RegisterEffect(e2,tp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_INACTIVATE) e2:SetCode(EFFECT_CANNOT_INACTIVATE)
......
...@@ -21,7 +21,7 @@ function c51124303.initial_effect(c) ...@@ -21,7 +21,7 @@ function c51124303.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c51124303.spfilter(c,e,tp,mc) function c51124303.spfilter(c,e,tp,mc)
return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and (not c.mat_filter or c.mat_filter(mc)) return c:IsSetCard(0xb4) and bit.band(c:GetType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false)
end end
function c51124303.rfilter(c,mc) function c51124303.rfilter(c,mc)
......
--妖仙獣の秘技
function c54903668.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c54903668.condition)
e1:SetTarget(c54903668.target)
e1:SetOperation(c54903668.activate)
c:RegisterEffect(e1)
end
function c54903668.filter1(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c54903668.filter2(c)
return c:IsFaceup() and not c:IsSetCard(0xb3)
end
function c54903668.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c54903668.filter1,tp,LOCATION_ONFIELD,0,1,nil)
and not Duel.IsExistingMatchingCard(c54903668.filter2,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c54903668.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c54903668.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--妖仙獣 左鎌神柱
function c65025250.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_PZONE)
e2:SetTarget(c65025250.reptg)
e2:SetValue(c65025250.repval)
e2:SetOperation(c65025250.repop)
c:RegisterEffect(e2)
--to defence
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65025250,0))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(c65025250.postg)
e3:SetOperation(c65025250.posop)
c:RegisterEffect(e3)
--cannot be target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c65025250.tgtg)
e4:SetValue(c65025250.tgval)
c:RegisterEffect(e4)
end
function c65025250.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0xb3) and not c:IsReason(REASON_REPLACE)
end
function c65025250.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not eg:IsContains(e:GetHandler()) and eg:IsExists(c65025250.filter,1,nil,tp) end
return Duel.SelectYesNo(tp,aux.Stringid(65025250,0))
end
function c65025250.repval(e,c)
return c65025250.filter(c,e:GetHandlerPlayer())
end
function c65025250.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
function c65025250.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAttackPos() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
end
function c65025250.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
end
end
function c65025250.tgtg(e,c)
return c:IsSetCard(0xb3) and c~=e:GetHandler()
end
function c65025250.tgval(e,re,tp)
return e:GetHandlerPlayer()~=tp
end
--妖仙獣 鎌壱太刀
function c65247798.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65247798,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c65247798.sumtg)
e1:SetOperation(c65247798.sumop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65247798,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e2:SetCountLimit(1)
e2:SetCondition(c65247798.thcon)
e2:SetTarget(c65247798.thtg)
e2:SetOperation(c65247798.thop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(c65247798.regop)
c:RegisterEffect(e3)
end
function c65247798.filter(c)
return c:IsSetCard(0xb3) and not c:IsCode(65247798) and c:IsSummonable(true,nil)
end
function c65247798.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65247798.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c65247798.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c65247798.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
function c65247798.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c65247798.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65247798.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c65247798.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c65247798.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c65247798.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c65247798.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c65247798.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c65247798.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c65247798.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65247798,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c65247798.rettg)
e1:SetOperation(c65247798.retop)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c65247798.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c65247798.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--妖仙獣 右鎌神柱
function c91420254.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--scale change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(91420254,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetCondition(c91420254.sccon)
e2:SetOperation(c91420254.scop)
c:RegisterEffect(e2)
--to defence
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(91420254,1))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(c91420254.postg)
e3:SetOperation(c91420254.posop)
c:RegisterEffect(e3)
--cannot be battle target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e4:SetTarget(c91420254.bttg)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c91420254.sccon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq)
return tc and tc:IsSetCard(0xb3)
end
function c91420254.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(11)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c91420254.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c91420254.splimit(e,c)
return not c:IsSetCard(0xb3)
end
function c91420254.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAttackPos() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
end
function c91420254.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
end
end
function c91420254.bttg(e,c)
return c:IsSetCard(0xb3) and c~=e:GetHandler()
end
--妖仙獣 鎌弐太刀
function c92246806.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(92246806,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c92246806.sumtg)
e1:SetOperation(c92246806.sumop)
c:RegisterEffect(e1)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
--damage reduce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetCondition(c92246806.rdcon)
e3:SetOperation(c92246806.rdop)
c:RegisterEffect(e3)
--return
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetOperation(c92246806.regop)
c:RegisterEffect(e4)
end
function c92246806.filter(c)
return c:IsSetCard(0xb3) and not c:IsCode(92246806) and c:IsSummonable(true,nil)
end
function c92246806.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c92246806.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c92246806.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c92246806.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
function c92246806.rdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c92246806.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
function c92246806.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(92246806,1))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c92246806.rettg)
e1:SetOperation(c92246806.retop)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c92246806.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c92246806.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--魔妖仙獣 大刃禍是
function c93368494.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(93368494,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c93368494.atkcon)
e2:SetOperation(c93368494.atkop)
c:RegisterEffect(e2)
--spsummon limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(c93368494.splimit)
c:RegisterEffect(e3)
--cannot disable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(93368494,1))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetTarget(c93368494.thtg)
e5:SetOperation(c93368494.thop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e6)
--return
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
e7:SetOperation(c93368494.regop)
c:RegisterEffect(e7)
end
function c93368494.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:IsControler(tp) and at:IsSetCard(0xb3)
end
function c93368494.atkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local at=Duel.GetAttacker()
if at:IsFaceup() and at:IsRelateToBattle() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
at:RegisterEffect(e1)
end
end
function c93368494.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c93368494.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c93368494.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function c93368494.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(93368494,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c93368494.rettg)
e1:SetOperation(c93368494.retop)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c93368494.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c93368494.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
...@@ -9,7 +9,7 @@ function c99659159.initial_effect(c) ...@@ -9,7 +9,7 @@ function c99659159.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTarget(c99659159.atktg) e2:SetTarget(c99659159.atktg)
e2:SetValue(500) e2:SetValue(500)
...@@ -38,7 +38,7 @@ function c99659159.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -38,7 +38,7 @@ function c99659159.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c99659159.filter,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(c99659159.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c99659159.operation(e,tp,eg,ep,ev,re,r,rp) function c99659159.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
......
...@@ -434,3 +434,4 @@ ...@@ -434,3 +434,4 @@
!counter 0x30 毅飞冲天指示物 !counter 0x30 毅飞冲天指示物
!counter 0x31 希望剑指示物 !counter 0x31 希望剑指示物
!counter 0x32 气球指示物 !counter 0x32 气球指示物
!counter 0x33 妖仙指示物
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