Skip to content
This repository was archived by the owner on Jun 22, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions script/c12958919.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
--幻銃士
function c12958919.initial_effect(c)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12958919,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c12958919.sptg)
e1:SetOperation(c12958919.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12958919,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c12958919.damcon)
e2:SetCost(c12958919.damcost)
e2:SetTarget(c12958919.damtg)
e2:SetOperation(c12958919.damop)
c:RegisterEffect(e2)
if not c12958919.global_check then
c12958919.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetOperation(c12958919.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c12958919.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsSetCard(0x49) then
Duel.RegisterFlagEffect(tc:GetControler(),12958919,RESET_PHASE+PHASE_END,0,1)
end
end
function c12958919.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12958920,0x49,0x4011,500,500,4,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c12958919.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
if ft>ct then ft=ct end
if ft<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,12958920,0x49,0x4011,500,500,4,RACE_FIEND,ATTRIBUTE_DARK) then return end
local ctn=true
while ft>0 and ctn do
local token=Duel.CreateToken(tp,12958920)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
ft=ft-1
if ft<=0 or not Duel.SelectYesNo(tp,aux.Stringid(12958919,2)) or Duel.IsPlayerAffectedByEffect(tp,59822133) then ctn=false end
end
Duel.SpecialSummonComplete()
end
function c12958919.damcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c12958919.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,12958919)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x49))
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c12958919.damfilter(c)
return c:IsFaceup() and c:IsSetCard(0x49)
end
function c12958919.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c12958919.damfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300)
end
function c12958919.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.GetMatchingGroupCount(c12958919.damfilter,tp,LOCATION_MZONE,0,nil)
Duel.Damage(p,ct*300,REASON_EFFECT)
end
39 changes: 39 additions & 0 deletions script/c22567609.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
--素早いモモンガ
function c22567609.initial_effect(c)
--battle destroyed
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22567609,0))
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c22567609.condition)
e1:SetTarget(c22567609.target)
e1:SetOperation(c22567609.operation)
c:RegisterEffect(e1)
end
function c22567609.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE)
and bit.band(e:GetHandler():GetReason(),REASON_BATTLE)~=0
end
function c22567609.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c22567609.filter(c,e,tp)
return c:IsCode(22567609) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
end
function c22567609.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Recover(tp,1000,REASON_EFFECT)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c22567609.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22567609,1)) then
Duel.BreakEffect()
Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
if ft>1 and g:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(22567609,1)) then
Duel.SpecialSummonStep(g:GetNext(),0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
Duel.SpecialSummonComplete()
end
end
64 changes: 64 additions & 0 deletions script/c23681456.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
--マドルチェ・ハッピーフェスタ
function c23681456.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c23681456.target)
e1:SetOperation(c23681456.operation)
c:RegisterEffect(e1)
end
function c23681456.filter(c,e,tp)
return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c23681456.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c23681456.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c23681456.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.SelectMatchingCard(tp,c23681456.filter,tp,LOCATION_HAND,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
local fid=e:GetHandler():GetFieldID()
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(23681456,RESET_EVENT+0x1fe0000,0,1,fid)
tc:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(23681456,0))
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c23681456.retcon)
e1:SetOperation(c23681456.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c23681456.retfilter(c,fid)
return c:GetFlagEffectLabel(23681456)==fid
end
function c23681456.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c23681456.retfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c23681456.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c23681456.retfilter,nil,e:GetLabel())
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
54 changes: 54 additions & 0 deletions script/c28577986.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
--水精鱗-オーケアビス
function c28577986.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(28577986,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,28577986)
e1:SetTarget(c28577986.target)
e1:SetOperation(c28577986.operation)
c:RegisterEffect(e1)
end
function c28577986.cfilter(c,e,tp)
local lv=c:GetLevel()
return lv>0 and c:IsFaceup() and c:IsSetCard(0x74)
and Duel.IsExistingMatchingCard(c28577986.spfilter,tp,LOCATION_DECK,0,1,nil,lv,e,tp)
end
function c28577986.spfilter(c,lv,e,tp)
if lv>4 then lv=4 end
return c:IsLevelBelow(lv) and c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c28577986.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c28577986.cfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c28577986.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c28577986.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c28577986.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local slv=tc:GetLevel()
local sg=Duel.GetMatchingGroup(c28577986.spfilter,tp,LOCATION_DECK,0,nil,slv,e,tp)
if sg:GetCount()==0 then return end
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=sg:Select(tp,1,1,nil):GetFirst()
sg:RemoveCard(tc)
slv=slv-tc:GetLevel()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
sg:Remove(Card.IsLevelAbove,nil,slv+1)
ft=ft-1
until ft<=0 or sg:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(28577986,1))
Duel.SpecialSummonComplete()
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
37 changes: 37 additions & 0 deletions script/c32679370.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
--ヒーロー・キッズ
function c32679370.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(32679370,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c32679370.target)
e1:SetOperation(c32679370.operation)
c:RegisterEffect(e1)
end
function c32679370.filter(c,e,tp)
return c:IsCode(32679370) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c32679370.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c32679370.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c32679370.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetMatchingGroup(c32679370.filter,tp,LOCATION_DECK,0,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
ft=ft-1
end
tc=g:GetNext()
while ft>1 and tc and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.SelectYesNo(tp,aux.Stringid(32679370,1)) then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
ft=ft-1
end
Duel.SpecialSummonComplete()
end
33 changes: 33 additions & 0 deletions script/c3493978.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
--首領亀
function c3493978.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3493978,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c3493978.target)
e1:SetOperation(c3493978.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c3493978.filter(c,e,tp)
return c:IsCode(3493978) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c3493978.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c3493978.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c3493978.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c3493978.filter,tp,LOCATION_HAND,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
44 changes: 44 additions & 0 deletions script/c40854824.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
--オーバー・ザ・レインボー
function c40854824.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c40854824.condition)
e1:SetTarget(c40854824.target)
e1:SetOperation(c40854824.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(40854824,ACTIVITY_CHAIN,c40854824.chainfilter)
end
function c40854824.chainfilter(re,tp,cid)
local code1,code2=re:GetHandler():GetOriginalCodeRule()
return not (re:IsActiveType(TYPE_MONSTER) and (code1==79407975 or code1==79856792 or code2==79407975 or code2==79856792))
end
function c40854824.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(40854824,tp,ACTIVITY_CHAIN)~=0
end
function c40854824.filter(c,e,tp)
return c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40854824.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c40854824.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c40854824.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c40854824.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()==0 then return end
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
g:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft-1
until ft<=0 or g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(40854824,0))
Duel.SpecialSummonComplete()
end
Loading