Commit f369a242 authored by VanillaSalt's avatar VanillaSalt

fix

parent 11637bcd
--Dynamist Rex
--NOT A Dinasaur, Lame
--Scripted by Ragna_Edge
--ダイナミスト・レックス
function c63251695.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -9,97 +7,113 @@ function c63251695.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63251695,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c63251695.negcon)
e2:SetTarget(c63251695.negtg)
e2:SetOperation(c63251695.negop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetDescription(aux.Stringid(63251695,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c63251695.effcon)
e3:SetCost(c63251695.effcost)
e3:SetTarget(c63251695.efftg)
e3:SetOperation(c63251695.effop)
c:RegisterEffect(e3)
end
function c63251695.tfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1e71) and c:IsControler(tp) and c:GetLocation()==LOCATION_ONFIELD
function c63251695.tfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsOnField()
end
function c63251695.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
if not e:GetHandler():GetFlagEffect(63251695)==0 then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c63251695.tfilter,1,nil) and g:GetFirst()~=e:GetHandler() and Duel.IsChainDisablable(ev)
end
function c63251695.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
return g and g:IsExists(c63251695.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
end
function c63251695.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(63251695,3)) then
e:GetHandler():RegisterFlagEffect(63251695,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
if Duel.SelectYesNo(tp,aux.Stringid(63251695,1)) then
e:GetHandler():RegisterFlagEffect(63251695,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev)
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
else end
end
end
function c63251695.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()==Duel.GetAttacker()
and ((Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,nil)) or (Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 and e:GetHandler():IsChainAttackable(2,true)))
end
function c63251695.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x1e71) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x1e71)
function c63251695.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0xd8) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0xd8)
Duel.Release(g,REASON_COST)
end
function c63251695.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=e:GetHandler():IsChainAttackable(2,true)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,nil)
if chk==0 then return b1 or b2 end
local opt=0
if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0 then
opt=Duel.SelectOption(tp,aux.Stringid(63251695,1))
if b1 and b2 then
opt=Duel.SelectOption(tp,aux.Stringid(63251695,2),aux.Stringid(63251695,3))
elseif b1 then
opt=Duel.SelectOption(tp,aux.Stringid(63251695,2))
else
opt=Duel.SelectOption(tp,aux.Stringid(63251695,0),aux.Stringid(63251695,1))
opt=Duel.SelectOption(tp,aux.Stringid(63251695,3))+1
end
e:SetLabel(opt)
if opt==0 then
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_ONFIELD+LOCATION_HAND)
if opt==1 then
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND)
end
end
function c63251695.effop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
local g1=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD,nil)
local sg1=g1:RandomSelect(tp,1)
local tc=sg1:GetFirst()
local c=e:GetHandler()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(100)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
else
local c=e:GetHandler()
if e:GetLabel()==0 then
if not c:IsRelateToBattle() then return end
Duel.ChainAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL)
c:RegisterEffect(e2)
else
local g1=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
local opt=0
if g1:GetCount()>0 and g2:GetCount()>0 then
opt=Duel.SelectOption(tp,aux.Stringid(63251695,4),aux.Stringid(63251695,5))
elseif g1:GetCount()>0 then
opt=0
else
opt=1
end
local sg=nil
if opt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
sg=g1:Select(tp,1,1,nil)
else
sg=g2:RandomSelect(tp,1)
end
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
if sg:GetFirst():IsLocation(LOCATION_DECK) and c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(100)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
end
--Majespecter Frog
--マジェスペクター・フロッグ
function c645794.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -11,10 +11,9 @@ function c645794.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
--e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,645794)
e2:SetTarget(c645794.thtg)
e2:SetOperation(c645794.thop)
e2:SetTarget(c645794.settg)
e2:SetOperation(c645794.setop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -36,15 +35,17 @@ function c645794.initial_effect(c)
e5:SetValue(c645794.indval)
c:RegisterEffect(e5)
end
function c645794.thfilter(c)
return c:IsSetCard(0xd0) and (not c:IsType(TYPE_MONSTER)) and c:IsSSetable()
function c645794.filter(c)
return c:IsSetCard(0xd0) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c645794.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c645794.thfilter,tp,LOCATION_DECK,0,1,nil) end
function c645794.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c645794.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c645794.thop(e,tp,eg,ep,ev,re,r,rp)
function c645794.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c645794.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c645794.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
......
--Dinomist Stegosaurus
--ダイナミスト・プテラン
function c64973287.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -18,39 +18,32 @@ function c64973287.initial_effect(c)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64973287,0))
e3:SetDescription(aux.Stringid(64973287,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCountLimit(1,64973287)
e3:SetCondition(c64973287.condition)
e3:SetCondition(aux.bdocon)
e3:SetTarget(c64973287.target)
e3:SetOperation(c64973287.operation)
c:RegisterEffect(e3)
end
function c64973287.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x1e71) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT))
function c64973287.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xd8)
and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp))
end
function c64973287.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c64973287.filter,1,e:GetHandler(),tp) and not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectYesNo(tp,aux.Stringid(37752990,0))
if chk==0 then return eg:IsExists(c64973287.repfilter,1,e:GetHandler(),tp) and not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectYesNo(tp,aux.Stringid(64973287,0))
end
function c64973287.repval(e,c)
return c64973287.filter(c,e:GetHandlerPlayer())
return c64973287.repfilter(c,e:GetHandlerPlayer())
end
function c64973287.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
function c64973287.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER)
end
function c64973287.filter(c)
return c:IsSetCard(0x1e71) and c:IsAbleToHand()
return c:IsSetCard(0xd8) and c:IsAbleToHand()
end
function c64973287.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c64973287.filter,tp,LOCATION_DECK,0,1,nil) end
......
--Supreme Warrior Ritual
--竜剣士マスターP
function c75195825.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -7,9 +7,10 @@ function c75195825.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--change scale
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88757791,0))
e2:SetDescription(aux.Stringid(75195825,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_CARD_TARGET)
......
--Unlucky Blast
--不運の爆弾
function c76004142.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e1)
e1:SetCountLimit(1,76004142+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c76004142.target)
e1:SetOperation(c76004142.activate)
c:RegisterEffect(e1)
......@@ -21,22 +22,25 @@ function c76004142.initial_effect(c)
e2:SetOperation(c76004142.damop)
c:RegisterEffect(e2)
end
function c76004142.filter(c,tp)
function c76004142.filter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function c76004142.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c76004142.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c76004142.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c76004142.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c76004142.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c76004142.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0)
end
function c76004142.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetAttack()/2
local dam=Duel.Damage(tp,atk,REASON_EFFECT)
Duel.Damage(1-tp,dam,REASON_EFFECT)
local val=Duel.Damage(tp,atk,REASON_EFFECT)
if val>0 and Duel.GetLP(tp)>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,val,REASON_EFFECT)
end
end
end
function c76004142.damcon(e,tp,eg,ep,ev,re,r,rp)
......
--Destruction Sword - Dragon Buster Blade
--破壊剣-ドラゴンバスターブレード
function c76218313.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
......@@ -9,6 +9,7 @@ function c76218313.initial_effect(c)
e1:SetTarget(c76218313.eqtg)
e1:SetOperation(c76218313.eqop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......@@ -28,7 +29,7 @@ function c76218313.initial_effect(c)
c:RegisterEffect(e3)
end
function c76218313.filter(c)
return c:IsFaceup() and c:GetCode()==78193831
return c:IsFaceup() and c:IsCode(78193831)
end
function c76218313.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c76218313.filter(chkc) end
......@@ -42,7 +43,7 @@ function c76218313.eqop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
......@@ -58,7 +59,6 @@ end
function c76218313.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c76218313.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
......@@ -70,7 +70,6 @@ function c76218313.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c76218313.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
--Twilight Ninja Shogun - Getsuga
--黄昏の忍者将軍-ゲツガ
function c76930964.initial_effect(c)
--normal summon with 1 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(55690251,0))
e1:SetDescription(aux.Stringid(76930964,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
......@@ -13,6 +13,7 @@ function c76930964.initial_effect(c)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -37,33 +38,35 @@ function c76930964.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c76930964.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c76930964.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPosition(POS_FACEUP_ATTACK)
end
function c76930964.filter(c,e,tp)
return c:IsSetCard(0x2b) and c:GetCode()~=76930964 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x2b) and not c:IsCode(76930964) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c76930964.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c76930964.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingTarget(c76930964.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c76930964.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function c76930964.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsDefencePos() then return end
Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==0 then return end
if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) and ft>=sg:GetCount() then
Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 then return end
if g:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--Dinomist Charge
--ダイナミスト・チャージ
function c77116346.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,77116346+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c77116346.target)
e1:SetOperation(c77116346.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_TO_DECK)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c77116346.condition)
e2:SetTarget(c77116346.target)
e2:SetOperation(c77116346.acop)
e2:SetCondition(c77116346.thcon)
e2:SetTarget(c77116346.thtg)
e2:SetOperation(c77116346.thop)
c:RegisterEffect(e2)
end
function c77116346.dfilter(c)
return c:IsSetCard(0x1e71) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
function c77116346.filter(c)
return c:IsSetCard(0xd8) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c77116346.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c77116346.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c77116346.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c77116346.dfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
local g=Duel.SelectMatchingCard(tp,c77116346.filter,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 c77116346.filter(c,e,tp)
return c:IsSetCard(0x1e71) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsControler(tp)
function c77116346.thfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsSetCard(0xd8)
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c77116346.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c77116346.filter,1,nil,tp)
function c77116346.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c77116346.thfilter,1,nil,tp)
end
function c77116346.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c77116346.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
local g=eg:Filter(c77116346.thfilter,nil,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c77116346.acop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c77116346.filter,nil,e,tp)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
function c77116346.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local rg=g:Select(tp,1,1,nil)
if rg:GetCount()>0 then
Duel.SendtoHand(rg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,rg)
end
end
--Blackwing – Harmattan the Sandstorm
--BF-砂塵のハルマッタン
function c77152542.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......@@ -9,50 +9,39 @@ function c77152542.initial_effect(c)
e1:SetCountLimit(1,77152542)
e1:SetCondition(c77152542.spcon)
c:RegisterEffect(e1)
--special summon
--level
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c77152542.target)
e2:SetOperation(c77152542.operation)
c:RegisterEffect(e2)
--normal summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c77152542.target)
e3:SetOperation(c77152542.operation)
c:RegisterEffect(e3)
end
function c77152542.filter(c)
function c77152542.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x33) and not c:IsCode(77152542)
end
function c77152542.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c77152542.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c77152542.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c77152542.filter2(c,e,tp)
return c:IsSetCard(0x33) and c:GetLevel()>=1
function c77152542.filter(c)
return c:IsFaceup() and c:IsSetCard(0x33) and c:GetLevel()>=1
end
function c77152542.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:GetControler()==tp and c77152542.filter2(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c77152542.filter2,tp,LOCATION_MZONE,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectTarget(tp,c77152542.filter2,tp,LOCATION_MZONE,0,1,1,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c77152542.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c77152542.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c77152542.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
end
function c77152542.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
......
--P° Reborn
--ペンデュラム・リボーン
function c77826734.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -11,11 +11,11 @@ function c77826734.initial_effect(c)
c:RegisterEffect(e1)
end
function c77826734.filter(c,e,tp)
return (c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) or c:IsLocation(LOCATION_GRAVE)) and c:IsType(TYPE_PENDULUM)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c77826734.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_EXTRA) and c77826734.filter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_EXTRA) and chkc:IsControler(tp) and c77826734.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c77826734.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
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