Commit 1fe1cd92 authored by mercury233's avatar mercury233

update scripts

parent 5476fcd0
#created by ... #created by ...
#main #main
100266005
100266012
100266013
100266014
100200181 100200181
100339021 100339021
100424002 100424002
...@@ -16,6 +20,10 @@ ...@@ -16,6 +20,10 @@
100424017 100424017
100424034 100424034
#extra #extra
100266007
100266008
100266009
100266010
100266006 100266006
100424001 100424001
!side !side
--風化戦士
--Weathering Soldier
--Scripted by: XGlitchy30
function c100266005.initial_effect(c)
aux.AddCodeList(c,100266011)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100266005,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCountLimit(1,100266005)
e1:SetTarget(c100266005.thtg)
e1:SetOperation(c100266005.thop)
c:RegisterEffect(e1)
local e1x=e1:Clone()
e1x:SetCode(EVENT_TO_GRAVE)
e1x:SetCondition(c100266005.thcon)
c:RegisterEffect(e1x)
--reduce atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100266005,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c100266005.atkcon)
e2:SetOperation(c100266005.atkop)
c:RegisterEffect(e2)
end
function c100266005.thfilter(c)
if not c:IsAbleToHand() or c:IsCode(100266005) then return false end
return c:IsCode(100266011) or aux.IsCodeListed(c,100266011)
end
function c100266005.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c100266005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100266005.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100266005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100266005.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c100266005.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c100266005.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() 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+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
-- --
--Script by mercury233 --Script by mercury233
function c100266006.initial_effect(c) function c100266006.initial_effect(c)
aux.AddCodeList(c,100266011)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_ROCK),c100266006.matfilter,true) aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_ROCK),c100266006.matfilter,true)
......
--中生代化石騎士 スカルナイト
--Fossil Warrior Skull Knight
--Scripted by: XGlitchy30
function c100266007.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_ROCK),c100266007.matfilter,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c100266007.splimit)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
--chain attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100266007,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c100266007.atcon)
e3:SetOperation(c100266007.atop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100266007,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,100266007)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c100266007.drytg)
e4:SetOperation(c100266007.dryop)
c:RegisterEffect(e4)
end
function c100266007.matfilter(c)
return c:IsLevel(5,6)
end
function c100266007.splimit(e,se,sp,st)
return st==SUMMON_TYPE_FUSION+0x20 or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c100266007.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and c:IsChainAttackable()
end
function c100266007.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
function c100266007.drytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c100266007.dryop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--新生代化石騎士 スカルポーン
--Fossil Warrior Skull Bone
--Scripted by: XGlitchy30
function c100266008.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_ROCK),c100266008.matfilter,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c100266008.splimit)
c:RegisterEffect(e1)
--extra attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e2:SetValue(1)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100266008,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100266008)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c100266008.thtg)
e3:SetOperation(c100266008.thop)
c:RegisterEffect(e3)
end
function c100266008.matfilter(c)
return c:GetLevel()>0 and c:IsLevelBelow(4)
end
function c100266008.splimit(e,se,sp,st)
return st==SUMMON_TYPE_FUSION+0x20 or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c100266008.thfilter(c)
return c:IsCode(100266012) and c:IsAbleToHand()
end
function c100266008.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100266008.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100266008.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100266008.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--古生代化石竜 スカルギオス
--Fossil Dragon Skullgios
--Scripted by: XGlitchy30
function c100266009.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_ROCK),c100266009.matfilter,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c100266009.splimit)
c:RegisterEffect(e1)
--switch stats
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100266009,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_CONFIRM)
e2:SetCondition(c100266009.atkcon)
e2:SetOperation(c100266009.atkop)
c:RegisterEffect(e2)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e3)
--double battle damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e4:SetCondition(c100266009.damcon)
e4:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e4)
end
function c100266009.matfilter(c,fc)
return c:IsFusionType(TYPE_MONSTER) and c:IsLevelAbove(7) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(1-fc:GetControler())
end
function c100266009.splimit(e,se,sp,st)
return st==SUMMON_TYPE_FUSION+0x20 or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c100266009.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsRelateToBattle() and bc:GetAttack()~=bc:GetDefense()
end
function c100266009.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if tc:IsFaceup() and tc:IsRelateToBattle() then
local atk=tc:GetAttack()
local def=tc:GetDefense()
if atk==def then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(def)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(atk)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e2)
end
end
function c100266009.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetSummonType()&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
end
--新生代化石竜 スカルガー
--Fossil Dragon Skullgar
--Scripted by: XGlitchy30
function c100266010.initial_effect(c)
aux.AddCodeList(c,100266011)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_ROCK),c100266010.matfilter,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c100266010.splimit)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100266010,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100266010)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c100266010.thtg)
e3:SetOperation(c100266010.thop)
c:RegisterEffect(e3)
end
function c100266010.matfilter(c,fc)
return c:IsFusionType(TYPE_MONSTER) and c:GetLevel()>0 and c:IsLevelBelow(4) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(1-fc:GetControler())
end
function c100266010.thfilter(c)
return c:IsCode(100266011) and c:IsAbleToHand()
end
function c100266010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100266010.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100266010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100266010.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--タイム・ストリーム
--
--Script by mercury233
function c100266012.initial_effect(c)
aux.AddCodeList(c,100266011)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100266012,0))
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100266012.target)
e1:SetOperation(c100266012.activate)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100266012,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetCost(c100266012.spcost)
e2:SetTarget(c100266012.sptg)
e2:SetOperation(c100266012.spop)
c:RegisterEffect(e2)
end
function c100266012.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x248) and c:IsType(TYPE_FUSION) and c:IsReleasableByEffect()
and Duel.IsExistingMatchingCard(c100266012.ffilter,tp,LOCATION_EXTRA,0,1,nil,c:GetOriginalLevel(),e,tp,c)
end
function c100266012.ffilter(c,lv,e,tp,tc)
return c:IsSetCard(0x248) and c:IsType(TYPE_FUSION) and c:GetOriginalLevel()==lv+2
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION+0x20,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c100266012.chkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x248) and c:IsType(TYPE_FUSION)
end
function c100266012.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsReleasableByEffect()
and chkc:IsFaceup() and chkc:IsSetCard(0x248) and chkc:IsType(TYPE_FUSION) end
if chk==0 then return Duel.IsExistingTarget(c100266012.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,c100266012.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
end
function c100266012.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local lv=tc:GetOriginalLevel()
if Duel.Release(tc,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c100266012.ffilter,tp,LOCATION_EXTRA,0,1,1,nil,lv,e,tp,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(sg,SUMMON_TYPE_FUSION+0x20,tp,tp,false,false,POS_FACEUP)
sg:GetFirst():CompleteProcedure()
end
end
function c100266012.cfilter(c,e,tp)
return c:IsSetCard(0x248) and c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(c100266012.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp)
end
function c100266012.spfilter(c,e,tp)
return c:IsSetCard(0x248) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100266012.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c100266012.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100266012.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100266012.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100266012.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100266012.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100266012.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
end
--標本の閲覧
--
--Script by mercury233
function c100266013.initial_effect(c)
aux.AddCodeList(c,100266011)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100266013+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c100266013.cost)
e1:SetTarget(c100266013.target)
e1:SetOperation(c100266013.operation)
c:RegisterEffect(e1)
end
function c100266013.cfilter(c)
return c:IsCode(100266011) and not c:IsPublic()
end
function c100266013.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100266013.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c100266013.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c100266013.tgfilter0(c)
return not c:IsPublic() or c:IsType(TYPE_MONSTER)
end
function c100266013.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,1,nil,TYPE_MONSTER) then return false end
local mc=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
return mc>0 or g and g:IsExists(c100266013.tgfilter0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100266013.tgfilter(c,race,lv)
return c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsLevel(lv) and c:IsAbleToGrave()
end
function c100266013.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND,0,1,1,nil,TYPE_MONSTER)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT) and g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local race=Duel.AnnounceRace(tp,1,RACE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_LVRANK)
local lv=Duel.AnnounceLevel(tp)
local cg=Duel.GetFieldGroup(tp,0,LOCATION_HAND+LOCATION_DECK)
Duel.ConfirmCards(1-tp,cg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=cg:FilterSelect(1-tp,c100266013.tgfilter,1,1,nil,race,lv)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
--奇跡の穿孔
--
--Script by mercury233
function c100266014.initial_effect(c)
aux.AddCodeList(c,100266011)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100266014+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100266014.target)
e1:SetOperation(c100266014.activate)
c:RegisterEffect(e1)
end
function c100266014.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ROCK) and c:IsLevelBelow(4) and c:IsAbleToGrave()
end
function c100266014.target(e,tp,eg,ep,ev,re,r,rp,chk)
local draw=Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,100266011)
if chk==0 then return Duel.IsExistingMatchingCard(c100266014.tgfilter,tp,LOCATION_DECK,0,1,nil)
and (not draw or Duel.IsPlayerCanDraw(tp,1)) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
if draw then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function c100266014.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100266014.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,100266011) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--三戦の才
--Three Tactical Talents
--Scripted by: XGlitchy30
function c101101062.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101101062+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101101062.condition)
e1:SetTarget(c101101062.target)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(101101062,ACTIVITY_CHAIN,c101101062.chainfilter)
end
function c101101062.chainfilter(re,tp,cid)
local ph=Duel.GetCurrentPhase()
return not (re:IsActiveType(TYPE_MONSTER) and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2))
end
function c101101062.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(101101062,1-tp,ACTIVITY_CHAIN)~=0
end
function c101101062.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsPlayerCanDraw(tp,2)
local b2=Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil)
local b3=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
if chk==0 then return b1 or b2 or b3 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(101101062,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(101101062,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(101101062,2)
opval[off-1]=3
off=off+1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
e:SetCategory(CATEGORY_DRAW)
e:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e:SetOperation(c101101062.draw)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
elseif opval[op]==2 then
e:SetCategory(CATEGORY_CONTROL)
e:SetProperty(0)
e:SetOperation(c101101062.control)
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE):Filter(Card.IsControlerCanBeChanged,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
elseif opval[op]==3 then
e:SetCategory(CATEGORY_TODECK)
e:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e:SetOperation(c101101062.todeck)
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,1-tp,LOCATION_HAND)
end
end
function c101101062.draw(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
function c101101062.control(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.GetControl(g:GetFirst(),tp,PHASE_END,1)
end
end
function c101101062.todeck(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetFieldGroup(p,0,LOCATION_HAND)
if #g>0 then
Duel.ConfirmCards(p,g)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:FilterSelect(p,Card.IsAbleToDeck,1,1,nil)
if #sg<=0 then return end
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
Duel.ShuffleHand(1-p)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment