Commit cb6c0e13 authored by mercury233's avatar mercury233

update scripts

parent 916e6204
...@@ -45,7 +45,7 @@ function c100248041.initial_effect(c) ...@@ -45,7 +45,7 @@ function c100248041.initial_effect(c)
ge1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) ge1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetOperation(c100248041.checkop) ge1:SetOperation(c100248041.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function c100248041.mfilter(c) function c100248041.mfilter(c)
return c:IsType(TYPE_SYNCHRO) return c:IsType(TYPE_SYNCHRO)
......
--サイバネット・クロスワイプ --サイバネット・カスケード
-- --
--Script by mercury233 --Script by mercury233
function c100319033.initial_effect(c) function c100319033.initial_effect(c)
......
--レスキュー・インターレーサー
--
--Script by mercury233
function c101009001.initial_effect(c)
--Damage to 0
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009001,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101009001)
e1:SetCondition(c101009001.dmcon)
e1:SetCost(c101009001.dmcost)
e1:SetOperation(c101009001.dmop)
c:RegisterEffect(e1)
--revive
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009001,1))
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCondition(c101009001.sumcon)
e2:SetTarget(c101009001.sumtg)
e2:SetOperation(c101009001.sumop)
c:RegisterEffect(e2)
end
function c101009001.dmcon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return d and d:IsControler(tp) and d:IsRace(RACE_CYBERSE) and Duel.GetBattleDamage(tp)>0
end
function c101009001.dmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
c:RegisterFlagEffect(101009001,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c101009001.dmop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetOperation(c101009001.damop)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c101009001.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(tp,0)
end
function c101009001.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(101009001)>0
end
function c101009001.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101009001.sumop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
--クロス・デバッガー
--
--Script by mercury233
function c101009002.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009002,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101009002)
e1:SetCondition(c101009002.spcon)
e1:SetTarget(c101009002.sptg)
e1:SetOperation(c101009002.spop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009002,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101009002+100)
e2:SetCondition(c101009002.atkcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101009002.atktg)
e2:SetOperation(c101009002.atkop)
c:RegisterEffect(e2)
end
function c101009002.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c101009002.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101009002.cfilter,tp,LOCATION_MZONE,0,2,nil)
end
function c101009002.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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101009002.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c101009002.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsControler(1-tp) then a,d=d,a end
e:SetLabelObject(a)
return a and d and a:IsRelateToBattle() and d:IsRelateToBattle() and a:IsType(TYPE_LINK) and d:IsType(TYPE_LINK)
end
function c101009002.atkfilter(c)
return c:IsType(TYPE_LINK) and c:IsAttackAbove(0)
end
function c101009002.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101009002.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101009002.atkfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101009002.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil)
end
function c101009002.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local a=e:GetLabelObject()
local tc=Duel.GetFirstTarget()
if a:IsFaceup() and a:IsRelateToBattle() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
a:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
a:RegisterEffect(e2)
end
end
--海晶乙女シーホース
--
--Scripted By-FW空鸽
function c101009003.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009003,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101009003)
e1:SetCondition(c101009003.spcon)
e1:SetValue(c101009003.spval)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009003,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101009003+100)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101009003.sptg)
e2:SetOperation(c101009003.spop)
c:RegisterEffect(e2)
end
function c101009003.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x22b) and c:IsType(TYPE_LINK)
end
function c101009003.checkzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(c101009003.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
zone=bit.bor(zone,tc:GetLinkedZone(tp))
end
return bit.band(zone,0x1f)
end
function c101009003.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=c101009003.checkzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101009003.spval(e,c)
local tp=c:GetControler()
local zone=c101009003.checkzone(tp)
return 0,zone
end
function c101009003.spfilter(c,e,tp,zone)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c101009003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=c101009003.checkzone(tp)
if chk==0 then return zone~=0
and Duel.IsExistingMatchingCard(c101009003.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101009003.spop(e,tp,eg,ep,ev,re,r,rp)
local zone=c101009003.checkzone(tp)
if zone==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101009003.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,zone)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
--海晶乙女シースター
--
--Scripted By-FW空鸽
function c101009004.initial_effect(c)
--boost
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009004,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(2,101009004)
e1:SetCost(c101009004.adcost)
e1:SetTarget(c101009004.adtg)
e1:SetOperation(c101009004.adop)
c:RegisterEffect(e1)
end
function c101009004.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c101009004.filter(c)
return c:IsFaceup() and c:IsSetCard(0x22b)
end
function c101009004.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101009004.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101009004.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101009004.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101009004.adop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--DMZドラゴン
--
--Script by mercury233
function c101009005.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009005,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetTarget(c101009005.eqtg)
e1:SetOperation(c101009005.eqop)
c:RegisterEffect(e1)
--chain attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009005,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c101009005.atkcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101009005.atktg)
e2:SetOperation(c101009005.atkop)
c:RegisterEffect(e2)
end
function c101009005.eqfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsLevelBelow(4)
end
function c101009005.tgfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end
function c101009005.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101009005.eqfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(c101009005.tgfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c101009005.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101009005.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g:GetFirst(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g:GetFirst(),1,0,0)
end
function c101009005.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc1=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetFirst()
local tc2=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsLocation,nil,LOCATION_MZONE):GetFirst()
if tc1 and tc2 and tc1:IsRelateToEffect(e) and tc2:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc1) then
Duel.Equip(tp,tc1,tc2,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101009005.eqlimit)
e1:SetLabelObject(tc2)
tc1:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e2)
end
end
function c101009005.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c101009005.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:IsControler(tp) and at:GetEquipCount()>0 and at:IsChainAttackable()
end
function c101009005.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetAttacker():GetEquipGroup()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c101009005.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local at=Duel.GetAttacker()
local g=at:GetEquipGroup()
if at:IsControler(tp) and Duel.Destroy(g,REASON_EFFECT)>0 then
Duel.ChainAttack()
end
end
--天威龍-アーダラ
--
--scripted by JoyJ
function c101009012.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009012,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101009012)
e1:SetCondition(c101009012.spcon)
e1:SetTarget(c101009012.sptg)
e1:SetOperation(c101009012.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009012,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,101009012+100)
e2:SetCondition(c101009012.thcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101009012.thtg)
e2:SetOperation(c101009012.thop)
c:RegisterEffect(e2)
end
function c101009012.spcfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c101009012.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101009012.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101009012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetMZoneCount(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101009012.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101009012.thcfilter(c)
return not c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c101009012.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101009012.thcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101009012.thfilter(c)
return c:IsRace(RACE_WYRM) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsFaceup()
end
function c101009012.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101009012.thfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c101009012.thfilter,tp,LOCATION_REMOVED,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101009012.thfilter,tp,LOCATION_REMOVED,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101009012.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
--天威龍-シュターナ
--
--scripted by JoyJ
function c101009013.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101009013)
e1:SetCondition(c101009013.spcon)
e1:SetTarget(c101009013.sptg)
e1:SetOperation(c101009013.spop)
c:RegisterEffect(e1)
--special summon and destory
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009013,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101009013+100)
e2:SetCondition(c101009013.descon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101009013.destg)
e2:SetOperation(c101009013.desop)
c:RegisterEffect(e2)
end
function c101009013.spcfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c101009013.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101009013.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101009013.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101009013.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101009013.descfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsType(TYPE_EFFECT)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
and c:GetPreviousControler()==tp
end
function c101009013.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101009013.descfilter,1,nil,tp)
end
function c101009013.tgfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e)
end
function c101009013.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c101009013.tgfilter,nil,e,tp)
if chk==0 then return g:GetCount()>0 end
local c=nil
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
c=g:Select(tp,1,1,nil):GetFirst()
else
c=g:GetFirst()
end
Duel.SetTargetCard(c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c101009013.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e)
and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(101009013,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
--天威龍-マニラ
--
--scripted by JoyJ
function c101009014.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009014,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101009014)
e1:SetCondition(c101009014.spcon)
e1:SetTarget(c101009014.sptg)
e1:SetOperation(c101009014.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009014,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,101009014+100)
e2:SetCondition(c101009014.negcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101009014.negtg)
e2:SetOperation(c101009014.negop)
c:RegisterEffect(e2)
end
function c101009014.spcfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c101009014.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101009014.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101009014.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101009014.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101009014.negcfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c101009014.negcon(e,tp,eg,ep,ev,re,r,rp)
if rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c101009014.negcfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
end
return false
end
function c101009014.negtg(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():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c101009014.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--天威龍-ナハタ
--
--scripted by JoyJ
function c101009015.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101009015)
e1:SetCondition(c101009015.spcon)
e1:SetTarget(c101009015.sptg)
e1:SetOperation(c101009015.spop)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009015,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,101009015+100)
e2:SetCondition(c101009015.atkcon)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c101009015.atkop)
c:RegisterEffect(e2)
end
function c101009015.spcfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c101009015.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101009015.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101009015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101009015.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101009015.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not d then return false end
if d:IsControler(tp) then a,d=d,a end
e:SetLabelObject(d)
return not a:IsType(TYPE_EFFECT) and d:IsControler(1-tp)
and d:IsFaceup() and a:IsFaceup()
end
function c101009015.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if not tc:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1500)
tc:RegisterEffect(e1)
end
--天威龍-ヴィシュダ
--
--scripted by JoyJ
function c101009016.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009016,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101009016)
e1:SetCondition(c101009016.spcon)
e1:SetTarget(c101009016.sptg)
e1:SetOperation(c101009016.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009016,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,101009016+100)
e2:SetCondition(c101009016.thcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101009016.thtg)
e2:SetOperation(c101009016.thop)
c:RegisterEffect(e2)
end
function c101009016.spcfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c101009016.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101009016.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101009016.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101009016.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101009016.thcfilter(c)
return not c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c101009016.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101009016.thcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101009016.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101009016.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
--ウィッチクラフトゴーレム・アルル
--
--Script by mercury233
function c101009028.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009028,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101009028)
e1:SetCondition(c101009028.atkcon)
e1:SetTarget(c101009028.target)
e1:SetOperation(c101009028.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009028,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,101009028)
e2:SetCondition(c101009028.tgcon)
e2:SetTarget(c101009028.target)
e2:SetOperation(c101009028.operation)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101009028,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c101009028.retcon)
e3:SetTarget(c101009028.rettg)
e3:SetOperation(c101009028.retop)
c:RegisterEffect(e3)
end
function c101009028.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return Duel.GetAttacker():IsControler(1-tp) and at:IsControler(tp) and at:IsFaceup() and at:IsRace(RACE_SPELLCASTER)
end
function c101009028.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end
function c101009028.tgcon(e,tp,eg,ep,ev,re,r,rp)
if rp~=1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c101009028.cfilter,1,nil)
end
function c101009028.thfilter(c,tp)
return c:IsAbleToHand() and (c:IsControler(1-tp) and c:IsOnField()
or c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x128) and c:IsType(TYPE_SPELL))
end
function c101009028.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c101009028.thfilter(chkc,tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c101009028.thfilter,tp,LOCATION_GRAVE,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c101009028.thfilter,tp,LOCATION_GRAVE,LOCATION_ONFIELD,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101009028.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c101009028.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c101009028.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 c101009028.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--縄張恐竜
--
--DJ.Tenka
function c101009033.initial_effect(c)
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCondition(c101009033.discon)
e1:SetTarget(c101009033.distg)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetCountLimit(1,101009033)
e2:SetTarget(c101009033.sptg)
e2:SetOperation(c101009033.spop)
c:RegisterEffect(e2)
end
function c101009033.discon(e)
return e:GetHandler():GetSequence()<5
end
function c101009033.distg(e,c)
return c:GetSequence()>4
end
function c101009033.spfilter(c,e,tp)
return c:IsCode(101009033) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101009033.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101009033.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101009033.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101009033.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--ヴァレルロード・X・ドラゴン
--
--Script by mercury233
function c101009039.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c101009039.mfilter,4,2)
c:EnableReviveLimit()
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c101009039.econ)
e1:SetValue(c101009039.efilter)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009039,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCost(c101009039.cost)
e2:SetTarget(c101009039.target)
e2:SetOperation(c101009039.operation)
c:RegisterEffect(e2)
end
function c101009039.mfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK)
end
function c101009039.econ(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c101009039.efilter(e,re,rp)
return re:GetHandler()~=e:GetHandler() and re:IsActiveType(TYPE_EFFECT)
end
function c101009039.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c101009039.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c101009039.spfilter(c,e,tp)
return c:IsSetCard(0x10f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101009039.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101009039.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(101009039,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local fid=c:GetFieldID()
tc:RegisterFlagEffect(101009039,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c101009039.rmcon)
e3:SetOperation(c101009039.rmop)
Duel.RegisterEffect(e3,tp)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c101009039.rmcon(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetFlagEffectLabel(101009039)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c101009039.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
--海晶乙女ブルースラッグ
--
--Scripted By-FW空鸽
function c101009040.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c101009040.mfilter,1,1)
c:EnableReviveLimit()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c101009040.regcon)
e1:SetOperation(c101009040.regop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009040,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101009040)
e2:SetCondition(c101009040.thcon)
e2:SetTarget(c101009040.thtg)
e2:SetOperation(c101009040.thop)
c:RegisterEffect(e2)
end
function c101009040.mfilter(c)
return c:IsLevelBelow(4) and c:IsLinkSetCard(0x22b)
end
function c101009040.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function c101009040.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c101009040.splimit)
Duel.RegisterEffect(e1,tp)
end
function c101009040.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(101009040) and bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function c101009040.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c101009040.thfilter(c)
return c:IsSetCard(0x22b) and c:IsType(TYPE_MONSTER) and not c:IsCode(101009040) and c:IsAbleToHand()
end
function c101009040.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101009040.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101009040.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101009040.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101009040.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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c101009040.splimit2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101009040.splimit2(e,c)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
--海晶乙女コーラルアネモネ
--
--Scripted By-FW空鸽
function c101009041.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_WATER),2,2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009041,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101009041)
e1:SetTarget(c101009041.sptg)
e1:SetOperation(c101009041.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009041,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101009041+100)
e2:SetCondition(c101009041.thcon)
e2:SetTarget(c101009041.thtg)
e2:SetOperation(c101009041.thop)
c:RegisterEffect(e2)
end
function c101009041.spfilter(c,e,tp,zone)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAttackBelow(1500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c101009041.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101009041.spfilter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101009041.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101009041.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101009041.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if tc:IsRelateToEffect(e) and zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c101009041.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101009041.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
function c101009041.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c101009041.thfilter(c)
return c:IsSetCard(0x22b) and c:IsType(TYPE_MONSTER) and not c:IsCode(101009041) and c:IsAbleToHand()
end
function c101009041.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101009041.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101009041.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101009041.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101009041.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
--海晶乙女マーブルド・ロック
--
--Scripted By-FW空鸽
function c101009042.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_WATER),2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009042,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101009042)
e1:SetTarget(c101009042.thtg)
e1:SetOperation(c101009042.thop)
c:RegisterEffect(e1)
--negate attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009042,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101009042.condition)
e2:SetCost(c101009042.cost)
e2:SetOperation(c101009042.operation)
c:RegisterEffect(e2)
end
function c101009042.thfilter(c)
return c:IsSetCard(0x22b) and c:IsType(TYPE_MONSTER) and not c:IsCode(101009042) and c:IsAbleToHand()
end
function c101009042.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101009042.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101009042.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101009042.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101009042.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 c101009042.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c101009042.cfilter(c)
return c:IsSetCard(0x22b) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c101009042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101009042.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c101009042.cfilter,1,1,REASON_COST)
end
function c101009042.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
a:RegisterEffect(e1)
if d then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
d:RegisterEffect(e2)
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetOperation(c101009042.damop)
e3:SetLabelObject(a)
e3:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e3,tp)
end
function c101009042.damop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject()==Duel.GetAttacker() then
Duel.ChangeBattleDamage(tp,0)
end
end
--天威の拳僧
function c101009043.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c101009043.matfilter,1,1)
c:EnableReviveLimit()
end
function c101009043.matfilter(c)
return c:IsLinkSetCard(0x22d) and not c:IsLinkType(TYPE_LINK)
end
--天威の龍仙女
--
--scripted by JoyJ
function c101009044.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_WYRM),2,2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009044,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101009044)
e1:SetCost(c101009044.spcost)
e1:SetTarget(c101009044.sptg)
e1:SetOperation(c101009044.spop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009044,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101009044+100)
e2:SetCondition(c101009044.atkcon)
e2:SetTarget(c101009044.atktg)
e2:SetOperation(c101009044.atkop)
c:RegisterEffect(e2)
end
function c101009044.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c101009044.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRace(RACE_WYRM)
end
function c101009044.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101009044.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c101009044.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101009044.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101009044.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c101009044.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101009044.actlimit(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsOnField()
and rc:GetSummonLocation()==LOCATION_EXTRA and not rc:IsSetCard(0x22d)
end
function c101009044.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
return tc and tc:IsFaceup() and tc:IsControler(tp) and not tc:IsType(TYPE_EFFECT)
end
function c101009044.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101009044.atkop(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 c101009045.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,3,c101009045.lcheck)
c:EnableReviveLimit()
end
function c101009045.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,1,nil,TYPE_LINK)
end
--リンク・バック
--
--Script by mercury233
function c101009051.initial_effect(c)
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009051,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101009051+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101009051.seqtg)
e1:SetOperation(c101009051.seqop)
c:RegisterEffect(e1)
end
function c101009051.filter(c,tp)
if not (c:IsType(TYPE_LINK) and c:GetSequence()>=5) then return false end
local zone=bit.band(c:GetLinkedZone(),0x1f)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL,zone)>0
end
function c101009051.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101009051.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c101009051.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101009051,1))
Duel.SelectTarget(tp,c101009051.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c101009051.seqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsControler(tp)) then return end
local zone=bit.band(tc:GetLinkedZone(),0x1f)
if Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL,zone)>0 then
local flag=bit.bxor(zone,0xff)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=0
if s==1 then nseq=0
elseif s==2 then nseq=1
elseif s==4 then nseq=2
elseif s==8 then nseq=3
else nseq=4 end
Duel.MoveSequence(tc,nseq)
local ct=tc:GetLink()
if Duel.IsPlayerCanDiscardDeck(tp,ct) and Duel.SelectYesNo(tp,aux.Stringid(101009051,2)) then
Duel.BreakEffect()
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
end
end
end
--グリッド・ロッド
--
--Script by mercury233
function c101009052.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c101009052.target)
e1:SetOperation(c101009052.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetValue(c101009052.eqlimit)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(300)
c:RegisterEffect(e3)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c101009052.efilter)
c:RegisterEffect(e4)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e5:SetValue(c101009052.valcon)
e5:SetCountLimit(1)
c:RegisterEffect(e5)
--equip
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(101009052,0))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_TO_GRAVE)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCondition(c101009052.indcon)
e6:SetTarget(c101009052.indtg)
e6:SetOperation(c101009052.indop)
c:RegisterEffect(e6)
end
function c101009052.filter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE)
end
function c101009052.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101009052.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101009052.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c101009052.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101009052.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c101009052.eqlimit(e,c)
return c:IsRace(RACE_CYBERSE) and c:GetControler()==e:GetHandler():GetControler()
end
function c101009052.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c101009052.valcon(e,re,r,rp)
return r==REASON_BATTLE
end
function c101009052.indcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY)
end
function c101009052.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101009052.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function c101009052.indop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101009052.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(101009052,1))
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
--ライジング・オブ・ファイア
--
--DJ.Tenka
function c101009053.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101009053)
e1:SetTarget(c101009053.target)
e1:SetOperation(c101009053.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c101009053.checkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetOperation(c101009053.desop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--Atk up
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(500)
c:RegisterEffect(e4)
--remove
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DESTROYED)
e5:SetCountLimit(101009053+100)
e5:SetCondition(c101009053.rmcon)
e5:SetTarget(c101009053.rmtg)
e5:SetOperation(c101009053.rmop)
c:RegisterEffect(e5)
end
function c101009053.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101009053.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101009053.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.IsExistingTarget(c101009053.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101009053.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101009053.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101009053.eqlimit)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
function c101009053.eqlimit(e,c)
return e:GetOwner()==c
end
function c101009053.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c101009053.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c101009053.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and rp==1-tp and c:GetPreviousControler()==tp
end
function c101009053.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c101009053.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--フォーチュン・ヴィジョン
--
--Script by mercury233
function c101009055.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,101009055+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c101009055.activate)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009055,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c101009055.indcon)
e2:SetOperation(c101009055.indop)
c:RegisterEffect(e2)
--avoid battle damage
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(101009055,2))
e3:SetCondition(c101009055.damcon)
e3:SetOperation(c101009055.damop)
c:RegisterEffect(e3)
end
function c101009055.filter(c)
return c:IsSetCard(0x31) and c:IsAbleToHand()
end
function c101009055.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c101009055.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101009055,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)
end
end
function c101009055.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp
end
function c101009055.indcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101009055.cfilter,1,nil,tp)
end
function c101009055.indop(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_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101009055.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101009055.cfilter,1,nil,1-tp)
end
function c101009055.damop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetValue(c101009055.damval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,101009055,RESET_PHASE+PHASE_END,0,1)
end
function c101009055.damval(e,re,val,r,rp,rc)
local tp=e:GetHandlerPlayer()
if Duel.GetFlagEffect(tp,101009055)==0 or bit.band(r,REASON_BATTLE)==0 then return val end
Duel.ResetFlagEffect(tp,101009055)
return 0
end
--天威無崩の地
--
--scripted by JoyJ
function c101009058.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--immune effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c101009058.etarget)
e2:SetValue(c101009058.efilter)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(c101009058.drcon)
e3:SetTarget(c101009058.drtg)
e3:SetOperation(c101009058.drop)
c:RegisterEffect(e3)
end
function c101009058.etarget(e,c)
return not c:IsType(TYPE_EFFECT)
end
function c101009058.efilter(e,re)
return re:IsActiveType(TYPE_MONSTER)
end
function c101009058.drfilter1(c)
return not c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c101009058.drfilter2(c,tp)
return c:IsType(TYPE_EFFECT) and c:GetSummonPlayer()==1-tp and c:IsFaceup()
end
function c101009058.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101009058.drfilter1,tp,LOCATION_MZONE,0,1,nil)
and eg:IsExists(c101009058.drfilter2,1,nil,tp)
end
function c101009058.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c101009058.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--虚ろなる龍輪
--
--scripted by JoyJ
function c101009059.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101009059+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101009059.target)
e1:SetOperation(c101009059.activate)
c:RegisterEffect(e1)
end
function c101009059.tgfilter(c)
return c:IsRace(RACE_WYRM) and c:IsAbleToGrave()
end
function c101009059.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101009059.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101009058.thcfilter(c)
return not c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c101009059.thfilter(c,tc)
return c:IsSetCard(0x22d) and c:IsType(TYPE_MONSTER)
and c:IsAbleToHand() and not c:IsCode(tc:GetCode())
end
function c101009059.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c101009059.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.IsExistingMatchingCard(c101009058.thcfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c101009059.thfilter,tp,LOCATION_DECK,0,1,nil,tc)
and Duel.SelectYesNo(tp,aux.Stringid(101009059,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101009059.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--ドロー・ディスチャージ
--
--Script by mercury233
function c101009067.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetCode(EVENT_DRAW)
e1:SetCountLimit(1,101009067+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101009067.condition)
e1:SetTarget(c101009067.target)
e1:SetOperation(c101009067.activate)
c:RegisterEffect(e1)
end
function c101009067.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and r&REASON_EFFECT~=0 and rp==1-tp
end
function c101009067.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350) end
local g=eg:Filter(Card.IsControler,nil,1-tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,1-tp,LOCATION_HAND)
end
function c101009067.activate(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsRelateToEffect,nil,e)
if #g>0 then
Duel.ConfirmCards(tp,g)
local sg=g:Filter(Card.IsType,nil,TYPE_MONSTER)
if #sg>0 then
local atk=0
local tc=sg:GetFirst()
while tc do
local tatk=tc:GetAttack()
if tatk<0 then tatk=0 end
atk=atk+tatk
tc=sg:GetNext()
end
Duel.Damage(1-tp,atk,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
Duel.ShuffleHand(1-tp)
end
end
--海晶乙女波動
--
--Scripted By-FW空鸽
function c101009068.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCondition(c101009068.con)
e1:SetTarget(c101009068.target)
e1:SetOperation(c101009068.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c101009068.handcon)
c:RegisterEffect(e2)
end
function c101009068.ccfilter(c)
return c:IsFaceup() and c:IsSetCard(0x22b) and c:IsType(TYPE_LINK)
end
function c101009068.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101009068.ccfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c101009068.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 aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
end
function c101009068.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x22b) and c:IsLinkAbove(2)
end
function c101009068.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() and tc:IsControler(1-tp) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if Duel.IsExistingMatchingCard(c101009068.cfilter,tp,LOCATION_MZONE,0,1,nil) and g1:GetCount()>0 then
Duel.BreakEffect()
local nc=g1:GetFirst()
while nc do
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetValue(c101009068.efilter)
e3:SetOwnerPlayer(tp)
nc:RegisterEffect(e3)
nc=g1:GetNext()
end
end
end
function c101009068.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c101009068.hcfilter(c)
return c:IsFaceup() and c:IsSetCard(0x22b) and c:IsLinkAbove(3)
end
function c101009068.handcon(e)
return Duel.IsExistingMatchingCard(c101009068.hcfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
--海晶乙女潮流
--
--Scripted By-FW空鸽
function c101009069.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCountLimit(1,101009069+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101009069.target)
e1:SetOperation(c101009069.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c101009069.handcon)
c:RegisterEffect(e2)
end
function c101009069.afilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x22b) and c:IsType(TYPE_LINK)
end
function c101009069.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return eg:IsExists(c101009069.afilter,1,nil,tp) end
end
function c101009069.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x22b) and c:IsLinkAbove(2)
end
function c101009069.activate(e,tp,eg,ep,ev,re,r,rp)
local a=eg:Filter(c101009069.afilter,nil,tp):GetFirst()
local bc=a:GetBattleTarget()
local dam=a:GetLink()
if dam<0 then dam=0 end
Duel.Damage(1-tp,dam*400,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c101009069.cfilter,tp,LOCATION_MZONE,0,1,nil) and bc:IsType(TYPE_LINK) then
local dam1=bc:GetLink()
Duel.Damage(1-tp,dam1*500,REASON_EFFECT)
end
end
function c101009069.hcfilter(c)
return c:IsFaceup() and c:IsSetCard(0x22b) and c:IsLinkAbove(3)
end
function c101009069.handcon(e)
return Duel.IsExistingMatchingCard(c101009069.hcfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
--妖仙獣の居太刀風
--
--Script by mercury233
function c101009071.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101009071+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c101009071.condition)
e1:SetTarget(c101009071.target)
e1:SetOperation(c101009071.activate)
c:RegisterEffect(e1)
end
function c101009071.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c101009071.cfilter(c)
return c:IsSetCard(0xb3) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function c101009071.tgfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c101009071.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingMatchingCard(c101009071.cfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingTarget(c101009071.tgfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local ct=1
if Duel.IsExistingTarget(c101009071.tgfilter,tp,0,LOCATION_ONFIELD,2,nil) then ct=2 end
local g=Duel.GetMatchingGroup(c101009071.cfilter,tp,LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg=Duel.SelectTarget(tp,c101009071.tgfilter,tp,0,LOCATION_ONFIELD,#sg,#sg,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,#tg,0,0)
end
function c101009071.activate(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
--天威無双の拳
--
--scripted by JoyJ
function c101009072.initial_effect(c)
--Activate(effect)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009072,0))
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c101009072.condition)
e1:SetTarget(c101009072.target)
e1:SetOperation(c101009072.operation)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009072,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c101009072.spcon)
e2:SetTarget(c101009072.sptg)
e2:SetOperation(c101009072.spop)
c:RegisterEffect(e2)
end
function c101009072.cfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_EFFECT)
end
function c101009072.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101009072.cfilter,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
and Duel.IsChainNegatable(ev)
end
function c101009072.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)
end
function c101009072.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function c101009072.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
end
function c101009072.spfilter(c,e,tp)
return not c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101009072.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c101009072.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101009072.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c101009072.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if tg then
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
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