Commit 1177553d authored by VanillaSalt's avatar VanillaSalt

fix

parent 708fa0c3
...@@ -17,15 +17,16 @@ function c14883228.initial_effect(c) ...@@ -17,15 +17,16 @@ function c14883228.initial_effect(c)
e2:SetCondition(c14883228.handcon) e2:SetCondition(c14883228.handcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c14883228.filter(c) function c14883228.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c14883228.handcon(e,tp,eg,ep,ev,re,r,rp) function c14883228.handcon(e)
return not Duel.IsExistingMatchingCard(c14883228.filter,tp,LOCATION_ONFIELD,0,1,nil) local tp=e:GetHandlerPlayer()
and Duel.IsExistingMatchingCard(c14883228.filter,tp,0,LOCATION_ONFIELD,2,nil) return not Duel.IsExistingMatchingCard(c14883228.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c14883228.cfilter,tp,0,LOCATION_ONFIELD,2,nil)
end end
function c14883228.filter(c) function c14883228.filter(c)
return c:IsFaceup() and c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end end
function c14883228.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c14883228.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c14883228.filter(chkc) end if chkc then return chkc:IsOnField() and c14883228.filter(chkc) end
......
...@@ -15,7 +15,7 @@ function c19814508.initial_effect(c) ...@@ -15,7 +15,7 @@ function c19814508.initial_effect(c)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c19814508.target) e2:SetTarget(c19814508.target)
e2:SetOperation(c19814508.operation) e2:SetOperation(c19814508.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atkup --atkup
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(19814508,1)) e3:SetDescription(aux.Stringid(19814508,1))
...@@ -25,8 +25,8 @@ function c19814508.initial_effect(c) ...@@ -25,8 +25,8 @@ function c19814508.initial_effect(c)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(c19814508.condition) e3:SetCondition(c19814508.atkcon)
e3:SetOperation(c19814508.operation) e3:SetOperation(c19814508.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c19814508.filter(c) function c19814508.filter(c)
...@@ -34,16 +34,14 @@ function c19814508.filter(c) ...@@ -34,16 +34,14 @@ function c19814508.filter(c)
end end
function c19814508.target(e,tp,eg,ep,ev,re,r,rp,chk) function c19814508.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if chk==0 then return tc:IsSetCard(0xb2) and tc:GetControler()==tp if chk==0 then return tc:IsSetCard(0xb2) and tc:IsControler(tp)
and Duel.IsExistingMatchingCard(c19814508.filter,tp,LOCATION_DECK,0,1,nil,tc:GetAttack()) end and Duel.IsExistingMatchingCard(c19814508.filter,tp,LOCATION_DECK,0,1,nil) end
tc:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c19814508.operation(e,tp,eg,ep,ev,re,r,rp) function c19814508.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c19814508.filter,tp,LOCATION_DECK,0,1,1,nil,tc:GetAttack()) local g=Duel.SelectMatchingCard(tp,c19814508.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
...@@ -52,10 +50,10 @@ end ...@@ -52,10 +50,10 @@ end
function c19814508.cfilter(c,tp) function c19814508.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xb2) and c:IsControler(tp) return c:IsFaceup() and c:IsSetCard(0xb2) and c:IsControler(tp)
end end
function c19814508.condition(e,tp,eg,ep,ev,re,r,rp) function c19814508.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c19814508.cfilter,1,nil,tp) return eg:IsExists(c19814508.cfilter,1,nil,tp)
end end
function c19814508.operation(e,tp,eg,ep,ev,re,r,rp) function c19814508.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
...@@ -69,4 +67,4 @@ function c19814508.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,4 +67,4 @@ function c19814508.operation(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
tc=g:GetNext() tc=g:GetNext()
end end
end end
\ No newline at end of file
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
function c20036055.initial_effect(c) function c20036055.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,20036055+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,20036055+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c20036055.sptg) e1:SetTarget(c20036055.sptg)
e1:SetOperation(c20036055.spop) e1:SetOperation(c20036055.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c20036055.filter(c,e,tp,id) function c20036055.filter(c,e,tp,id)
return c:IsSetCard(0xb1) and c:GetTurnID()==id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsReason(REASON_RETURN) return c:IsSetCard(0xb1) and c:GetTurnID()==id and not c:IsReason(REASON_RETURN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c20036055.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c20036055.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
...@@ -25,11 +25,12 @@ function c20036055.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -25,11 +25,12 @@ function c20036055.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c20036055.spop(e,tp,eg,ep,ev,re,r,rp) function c20036055.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>ft then if sg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil) sg=sg:Select(tp,ft,ft,nil)
end end
local ct=Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end end
...@@ -7,29 +7,29 @@ function c20758643.initial_effect(c) ...@@ -7,29 +7,29 @@ function c20758643.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SELF_DESTROY) e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c20758643.sdcon) e1:SetCondition(c20758643.sdcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Special Summon --Special Summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(20758643,0)) e2:SetDescription(aux.Stringid(20758643,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,20758643) e2:SetCountLimit(1,20758643)
e2:SetCondition(c20758643.sscon) e2:SetCondition(c20758643.sscon)
e2:SetTarget(c20758643.sstg) e2:SetTarget(c20758643.sstg)
e2:SetOperation(c20758643.ssop) e2:SetOperation(c20758643.ssop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetDescription(aux.Stringid(20758643,1)) e3:SetDescription(aux.Stringid(20758643,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,20758643) e3:SetCountLimit(1,20758643)
e3:SetCondition(c20758643.thcon) e3:SetCondition(c20758643.spcon)
e3:SetTarget(c20758643.thtg) e3:SetTarget(c20758643.sptg)
e3:SetOperation(c20758643.thop) e3:SetOperation(c20758643.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c20758643.sdfilter(c) function c20758643.sdfilter(c)
...@@ -42,7 +42,7 @@ function c20758643.filter(c) ...@@ -42,7 +42,7 @@ function c20758643.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c20758643.sscon(e,tp,eg,ep,ev,re,r,rp) function c20758643.sscon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c20758643.filter,tp,LOCATION_ONFIELD,0,1,nil) return not Duel.IsExistingMatchingCard(c20758643.filter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c20758643.sstg(e,tp,eg,ep,ev,re,r,rp,chk) function c20758643.sstg(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
...@@ -50,26 +50,27 @@ function c20758643.sstg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,26 +50,27 @@ function c20758643.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c20758643.ssop(e,tp,eg,ep,ev,re,r,rp) function c20758643.ssop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and not Duel.IsExistingMatchingCard(c20758643.filter,tp,LOCATION_ONFIELD,0,1,nil) then if Duel.IsExistingMatchingCard(c20758643.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK) if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c20758643.thcon(e,tp,eg,ep,ev,re,r,rp) function c20758643.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN) return not e:GetHandler():IsReason(REASON_RETURN)
end end
function c20758643.spfilter(c,e,tp) function c20758643.spfilter(c,e,tp)
return c:IsSetCard(0xb1) and c:GetCode()~=20758643 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xb1) and not c:IsCode(20758643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c20758643.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c20758643.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
and Duel.IsExistingMatchingCard(c23899727.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c20758643.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c20758643.thop(e,tp,eg,ep,ev,re,r,rp) function c20758643.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c23899727.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c20758643.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -16,7 +16,7 @@ function c25005816.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c25005816.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c25005816.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c25005816.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsControler(tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
......
--Master Craftsman Gamil --Master Craftsman Gamil
--TCG Version
function c25727454.initial_effect(c) function c25727454.initial_effect(c)
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetDescription(aux.Stringid(25727454,0)) e1:SetDescription(aux.Stringid(25727454,0))
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c25727454.condition) e1:SetCondition(c25727454.condition)
e1:SetCost(c25727454.cost) e1:SetCost(c25727454.cost)
e1:SetOperation(c25727454.operation) e1:SetOperation(c25727454.operation)
...@@ -20,17 +19,16 @@ function c25727454.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,17 +19,16 @@ function c25727454.condition(e,tp,eg,ep,ev,re,r,rp)
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return (a:GetControler()==tp and a:IsRelateToBattle()) return (a:IsControler(tp) and a:IsRelateToBattle()) or (d and d:IsControler(tp) and d:IsRelateToBattle())
or (d and d:GetControler()==tp and d:IsRelateToBattle())
end end
function c25727454.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c25727454.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c25727454.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c25727454.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end
if not a:IsRelateToBattle() then return end if not a:IsRelateToBattle() or a:IsFacedown() then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -8,51 +8,49 @@ function c50277973.initial_effect(c) ...@@ -8,51 +8,49 @@ function c50277973.initial_effect(c)
e1:SetTarget(c50277973.target) e1:SetTarget(c50277973.target)
e1:SetOperation(c50277973.activate) e1:SetOperation(c50277973.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--dummy effect
local e2=Effect.CreateEffect(c)
c:RegisterEffect(e2)
e1:SetLabelObject(e2)
end end
function c50277973.target(e,tp,eg,ep,ev,re,r,rp,chk) function c50277973.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then
and Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,nil,nil) end local rac=0
Duel.Hint(HINT_SELECTMSG,tp,0) local crac=1
for irac=0,23 do
local att = 0x1 local catt=1
local aat = 0x0 for iatt=0,7 do
while att<0x80 do if Duel.IsPlayerCanSpecialSummonMonster(tp,5189,0,0x11,0,2200,4,crac,catt) then
if Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,nil,att) then rac=rac+crac
aat=bit.bor(aat,att) break
end
catt=catt*2
end
crac=crac*2
end end
att=bit.lshift(att, 1) e:SetLabel(rac)
return rac~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
Duel.Hint(HINT_SELECTMSG,tp,563)
aat=Duel.AnnounceAttribute(tp,1,aat) local crac=Duel.AnnounceRace(tp,1,e:GetLabel())
e:SetLabel(aat) local att=0
local catt=1
local rcc= 0x1 for iatt=0,7 do
local rc = 0x0 if Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,crac,catt) then
att=att+catt
while rcc<0x1000000 do
if Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,rcc,nil) then
rc=bit.bor(rc,rcc)
end end
rcc=bit.lshift(rcc, 1) catt=catt*2
end end
Duel.Hint(HINT_SELECTMSG,tp,562)
Duel.Hint(HINT_SELECTMSG,tp,563) catt=Duel.AnnounceAttribute(tp,1,att)
rc=Duel.AnnounceRace(tp,1,rc) e:SetLabel(crac)
e:GetLabelObject():SetLabel(rc) Duel.SetTargetParam(catt)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c50277973.activate(e,tp,eg,ep,ev,re,r,rp) function c50277973.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local att=e:GetLabel() local rac=e:GetLabel()
local race=e:GetLabelObject():GetLabel() local att=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,race,att) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,rac,att) then return end
c:AddTrapMonsterAttribute(TYPE_NORMAL,att,race,4,1800,1000) c:AddTrapMonsterAttribute(TYPE_NORMAL,att,rac,4,1800,1000)
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
c:TrapMonsterBlock() c:TrapMonsterBlock()
end end
\ No newline at end of file
...@@ -24,14 +24,14 @@ function c51099515.tfilter(c) ...@@ -24,14 +24,14 @@ function c51099515.tfilter(c)
return c:IsFaceup() and c:GetAttack()>0 return c:IsFaceup() and c:GetAttack()>0
end end
function c51099515.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c51099515.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c51099515.tfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c51099515.tfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c51099515.tfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c51099515.tfilter,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,c51099515.tfilter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c51099515.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c51099515.activate(e,tp,eg,ep,ev,re,r,rp) function c51099515.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
...@@ -39,4 +39,4 @@ function c51099515.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,4 +39,4 @@ function c51099515.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -22,7 +22,7 @@ function c56421754.initial_effect(c) ...@@ -22,7 +22,7 @@ function c56421754.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c56421754.spfilter(c) function c56421754.spfilter(c)
return c:IsSetCard(0xb2) and c:GetCode()~=56421754 and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(56421754) and c:IsAbleToHandAsCost()
end end
function c56421754.spcon(e,c) function c56421754.spcon(e,c)
if c==nil then return true end if c==nil then return true end
...@@ -32,7 +32,6 @@ end ...@@ -32,7 +32,6 @@ end
function c56421754.spop(e,tp,eg,ep,ev,re,r,rp,c) function c56421754.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c56421754.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c56421754.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
if not g:GetFirst():IsFaceup then Duel.ConfirmCards(1-tp,g) end
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c56421754.aclimit(e,re,tp) function c56421754.aclimit(e,re,tp)
......
...@@ -7,29 +7,29 @@ function c57143342.initial_effect(c) ...@@ -7,29 +7,29 @@ function c57143342.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SELF_DESTROY) e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c57143342.sdcon) e1:SetCondition(c57143342.sdcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Special Summon --Special Summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(57143342,0)) e2:SetDescription(aux.Stringid(57143342,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,57143342) e2:SetCountLimit(1,57143342)
e2:SetCondition(c57143342.sscon) e2:SetCondition(c57143342.sscon)
e2:SetTarget(c57143342.sstg) e2:SetTarget(c57143342.sstg)
e2:SetOperation(c57143342.ssop) e2:SetOperation(c57143342.ssop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetDescription(aux.Stringid(57143342,1)) e3:SetDescription(aux.Stringid(57143342,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,57143342) e3:SetCountLimit(1,57143342)
e3:SetCondition(c57143342.thcon) e3:SetCondition(c57143342.spcon)
e3:SetTarget(c57143342.thtg) e3:SetTarget(c57143342.sptg)
e3:SetOperation(c57143342.thop) e3:SetOperation(c57143342.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c57143342.sdfilter(c) function c57143342.sdfilter(c)
...@@ -42,7 +42,7 @@ function c57143342.filter(c) ...@@ -42,7 +42,7 @@ function c57143342.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c57143342.sscon(e,tp,eg,ep,ev,re,r,rp) function c57143342.sscon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c57143342.filter,tp,LOCATION_ONFIELD,0,1,nil) return not Duel.IsExistingMatchingCard(c57143342.filter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c57143342.sstg(e,tp,eg,ep,ev,re,r,rp,chk) function c57143342.sstg(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
...@@ -50,27 +50,28 @@ function c57143342.sstg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,27 +50,28 @@ function c57143342.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c57143342.ssop(e,tp,eg,ep,ev,re,r,rp) function c57143342.ssop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and not Duel.IsExistingMatchingCard(c57143342.filter,tp,LOCATION_ONFIELD,0,1,nil) then if Duel.IsExistingMatchingCard(c57143342.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK) if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c57143342.thcon(e,tp,eg,ep,ev,re,r,rp) function c57143342.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN) return not e:GetHandler():IsReason(REASON_RETURN)
end end
function c57143342.thfilter(c) function c57143342.spfilter(c,e,tp)
return c:IsSetCard(0xb1) and not c:IsCode(57143342) and c:IsAbleToHand() return c:IsSetCard(0xb1) and not c:IsCode(57143342) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c57143342.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c57143342.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57143342.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c57143342.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c57143342.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) and Duel.IsExistingTarget(c57143342.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c57143342.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) local g=Duel.SelectTarget(tp,c57143342.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c57143342.thop(e,tp,eg,ep,ev,re,r,rp) function c57143342.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.ConfirmCards(1-tp,tc)
end end
end end
\ No newline at end of file
--Doomstar Magician --Doomstar Magician
function c58369990.initial_effect(c) function c58369990.initial_effect(c)
--tohand --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(58369990,1)) e1:SetDescription(aux.Stringid(58369990,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c58369990.cost) e1:SetCost(c58369990.cost)
e1:SetTarget(c58369990.tg) e1:SetTarget(c58369990.target)
e1:SetOperation(c58369990.op) e1:SetOperation(c58369990.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c58369990.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c58369990.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -20,18 +20,16 @@ end ...@@ -20,18 +20,16 @@ end
function c58369990.filter(c) function c58369990.filter(c)
return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsDestructable() return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsDestructable()
end end
function c58369990.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c58369990.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c58369990.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_SZONE) and c58369990.filter(chkc) end
if chk==0 then return if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c58369990.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
and Duel.IsExistingTarget(c58369990.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c58369990.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) local g=Duel.SelectTarget(tp,c58369990.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c58369990.thop1(e,tp,eg,ep,ev,re,r,rp) function c58369990.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
......
...@@ -26,7 +26,7 @@ function c82419869.initial_effect(c) ...@@ -26,7 +26,7 @@ function c82419869.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c82419869.spfilter(c) function c82419869.spfilter(c)
return c:IsSetCard(0xb2) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(82419869) and c:IsAbleToHandAsCost()
end end
function c82419869.spcon(e,c) function c82419869.spcon(e,c)
if c==nil then return true end if c==nil then return true end
...@@ -36,7 +36,6 @@ end ...@@ -36,7 +36,6 @@ end
function c82419869.spop(e,tp,eg,ep,ev,re,r,rp,c) function c82419869.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c82419869.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c82419869.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
if not g:GetFirst():IsFaceup then Duel.ConfirmCards(1-tp,g) end
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c82419869.discon(e,tp,eg,ep,ev,re,r,rp) function c82419869.discon(e,tp,eg,ep,ev,re,r,rp)
...@@ -45,10 +44,8 @@ function c82419869.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,10 +44,8 @@ function c82419869.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and Duel.GetTurnPlayer()~=tp return Duel.IsChainNegatable(ev) and Duel.GetTurnPlayer()~=tp
end end
function c82419869.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c82419869.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c82419869.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c82419869.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -62,4 +59,4 @@ function c82419869.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,4 +59,4 @@ function c82419869.disop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -11,7 +11,7 @@ function c83531441.initial_effect(c) ...@@ -11,7 +11,7 @@ function c83531441.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c83531441.atkcost) e1:SetCost(c83531441.atkcost)
e1:SetOperation(c83531441.operation) e1:SetOperation(c83531441.atkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to defence --to defence
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -22,8 +22,8 @@ function c83531441.initial_effect(c) ...@@ -22,8 +22,8 @@ function c83531441.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetDescription(aux.Stringid(83531441,1)) e3:SetDescription(aux.Stringid(83531441,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
...@@ -78,7 +78,7 @@ end ...@@ -78,7 +78,7 @@ end
function c83531441.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c83531441.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c83531441.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c83531441.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c83531441.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c83531441.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c83531441.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,c83531441.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
......
...@@ -7,7 +7,7 @@ function c84764038.initial_effect(c) ...@@ -7,7 +7,7 @@ function c84764038.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SELF_DESTROY) e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c84764038.sdcon) e1:SetCondition(c84764038.sdcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Special Summon --Special Summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(84764038,0)) e2:SetDescription(aux.Stringid(84764038,0))
...@@ -36,7 +36,7 @@ function c84764038.filter(c) ...@@ -36,7 +36,7 @@ function c84764038.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c84764038.sscon(e,tp,eg,ep,ev,re,r,rp) function c84764038.sscon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c84764038.filter,tp,LOCATION_ONFIELD,0,1,nil) return not Duel.IsExistingMatchingCard(c84764038.filter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c84764038.sstg(e,tp,eg,ep,ev,re,r,rp,chk) function c84764038.sstg(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
...@@ -44,8 +44,9 @@ function c84764038.sstg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,8 +44,9 @@ function c84764038.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c84764038.ssop(e,tp,eg,ep,ev,re,r,rp) function c84764038.ssop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and not Duel.IsExistingMatchingCard(c84764038.filter,tp,LOCATION_ONFIELD,0,1,nil) then if Duel.IsExistingMatchingCard(c84764038.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK) if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c84764038.regop(e,tp,eg,ep,ev,re,r,rp) function c84764038.regop(e,tp,eg,ep,ev,re,r,rp)
...@@ -65,7 +66,8 @@ function c84764038.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +66,8 @@ function c84764038.regop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c84764038.thfilter(c) function c84764038.thfilter(c)
return c:GetLevel()== 3 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND) and not c:IsCode(84764038) and c:IsAbleToHand() return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND)
and not c:IsCode(84764038) and c:IsAbleToHand()
end end
function c84764038.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c84764038.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c84764038.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c84764038.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -8,51 +8,49 @@ function c87772572.initial_effect(c) ...@@ -8,51 +8,49 @@ function c87772572.initial_effect(c)
e1:SetTarget(c87772572.target) e1:SetTarget(c87772572.target)
e1:SetOperation(c87772572.activate) e1:SetOperation(c87772572.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--dummy effect
local e2=Effect.CreateEffect(c)
c:RegisterEffect(e2)
e1:SetLabelObject(e2)
end end
function c87772572.target(e,tp,eg,ep,ev,re,r,rp,chk) function c87772572.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then
and Duel.IsPlayerCanSpecialSummonMonster(tp,87772572,0,0x11,0,2200,4,nil,nil) end local rac=0
Duel.Hint(HINT_SELECTMSG,tp,0) local crac=1
for irac=0,23 do
local att = 0x1 local catt=1
local aat = 0x0 for iatt=0,7 do
while att<0x80 do if Duel.IsPlayerCanSpecialSummonMonster(tp,87772572,0,0x11,0,2200,4,crac,catt) then
if Duel.IsPlayerCanSpecialSummonMonster(tp,87772572,0,0x11,0,2200,4,nil,att) then rac=rac+crac
aat=bit.bor(aat,att) break
end
catt=catt*2
end
crac=crac*2
end end
att=bit.lshift(att, 1) e:SetLabel(rac)
return rac~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
Duel.Hint(HINT_SELECTMSG,tp,563)
aat=Duel.AnnounceAttribute(tp,1,aat) local crac=Duel.AnnounceRace(tp,1,e:GetLabel())
e:SetLabel(aat) local att=0
local catt=1
local rcc= 0x1 for iatt=0,7 do
local rc = 0x0 if Duel.IsPlayerCanSpecialSummonMonster(tp,87772572,0,0x11,0,2200,4,crac,catt) then
att=att+catt
while rcc<0x1000000 do
if Duel.IsPlayerCanSpecialSummonMonster(tp,87772572,0,0x11,0,2200,4,rcc,nil) then
rc=bit.bor(rc,rcc)
end end
rcc=bit.lshift(rcc, 1) catt=catt*2
end end
Duel.Hint(HINT_SELECTMSG,tp,562)
Duel.Hint(HINT_SELECTMSG,tp,563) catt=Duel.AnnounceAttribute(tp,1,att)
rc=Duel.AnnounceRace(tp,1,rc) e:SetLabel(crac)
e:GetLabelObject():SetLabel(rc) Duel.SetTargetParam(catt)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c87772572.activate(e,tp,eg,ep,ev,re,r,rp) function c87772572.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local att=e:GetLabel() local rac=e:GetLabel()
local race=e:GetLabelObject():GetLabel() local att=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,87772572,0,0x11,0,2200,4,race,att) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,87772572,0,0x11,0,2200,4,rac,att) then return end
c:AddTrapMonsterAttribute(TYPE_NORMAL,att,race,4,0,2200) c:AddTrapMonsterAttribute(TYPE_NORMAL,att,rac,4,0,2200)
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
c:TrapMonsterBlock() c:TrapMonsterBlock()
end end
\ No newline at end of file
...@@ -13,13 +13,13 @@ function c88494120.initial_effect(c) ...@@ -13,13 +13,13 @@ function c88494120.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c88494120.condition(e,tp,eg,ep,ev,re,r,rp) function c88494120.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0,nil)==1 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
and Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0,nil)>0
end end
function c88494120.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c88494120.target(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:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
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
...@@ -27,22 +27,13 @@ function c88494120.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,22 +27,13 @@ function c88494120.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()==0 then return end
local atk=0 local mg,atk=g:GetMinGroup(Card.GetAttack)
local tg=g:GetMinGroup(Card.GetAttack) local e1=Effect.CreateEffect(e:GetHandler())
if tg:GetCount()>1 then e1:SetType(EFFECT_TYPE_SINGLE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) e1:SetCode(EFFECT_UPDATE_ATTACK)
local sg=tg:Select(tp,1,1,nil) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
Duel.HintSelection(sg) e1:SetValue(atk)
atk=sg:GetFirst():GetAttack() tc:RegisterEffect(e1)
else atk=tg:GetFirst():GetAttack() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e1:SetValue(atk)
tc:RegisterEffect(e1)
end
end end
end end
...@@ -9,25 +9,25 @@ function c88610708.initial_effect(c) ...@@ -9,25 +9,25 @@ function c88610708.initial_effect(c)
e1:SetTarget(c88610708.target) e1:SetTarget(c88610708.target)
e1:SetOperation(c88610708.operation) e1:SetOperation(c88610708.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--no dam --Equip limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetCondition(c88610708.damcon) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(1) e2:SetValue(c88610708.eqlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Equip limit --Atk up
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(1000)
e3:SetValue(c88610708.eqlimit)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Atk up --no damage
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP) e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK) e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetValue(1000) e4:SetCondition(c88610708.damcon)
e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c88610708.eqlimit(e,c) function c88610708.eqlimit(e,c)
...@@ -37,7 +37,7 @@ function c88610708.filter(c) ...@@ -37,7 +37,7 @@ function c88610708.filter(c)
return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL
end end
function c88610708.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c88610708.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c88610708.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c88610708.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88610708.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c88610708.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c88610708.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c88610708.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
...@@ -8,25 +8,25 @@ function c99733359.initial_effect(c) ...@@ -8,25 +8,25 @@ function c99733359.initial_effect(c)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetCountLimit(1,99733359) e1:SetCountLimit(1,99733359)
e1:SetCondition(c99733359.con) e1:SetCondition(c99733359.condition)
e1:SetCost(c99733359.cost) e1:SetCost(c99733359.cost)
e1:SetTarget(c99733359.tg) e1:SetTarget(c99733359.target)
e1:SetOperation(c99733359.op) e1:SetOperation(c99733359.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c99733359.con(e,tp,eg,ep,ev,re,r,rp) function c99733359.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c99733359.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c99733359.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
function c99733359.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c99733359.target(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
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c99733359.op(e,tp,eg,ep,ev,re,r,rp) function c99733359.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
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