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
35 changes: 16 additions & 19 deletions script/c511000706.lua
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
--Statue Zone
function c511000706.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c511000706.disable)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
end
function c511000706.disable(e,c)
return c:IsSetCard(0x21e)
end
--Statue Zone
function c511000706.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x21e))
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
end
83 changes: 46 additions & 37 deletions script/c511000806.lua
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
--Hellfire Boatwatcher, Ghost Charon
function c511000806.initial_effect(c)
--synchro custom
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetTarget(c511000806.syntg)
e1:SetValue(1)
e1:SetOperation(c511000806.synop)
c:RegisterEffect(e1)
end
function c511000806.synfilter1(c,syncard,tuner,f)
return c:IsFaceup() and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c))
end
function c511000806.synfilter2(c,syncard,tuner,f)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c))
end
function c511000806.syntg(e,syncard,f,minc,maxc)
local c=e:GetHandler()
local lv=syncard:GetLevel()-c:GetLevel()
if lv<=0 then return false end
local g=Duel.GetMatchingGroup(c511000806.synfilter1,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local exg=Duel.GetMatchingGroup(c511000806.synfilter2,syncard:GetControler(),LOCATION_GRAVE,0,c,syncard,c,f)
g:Merge(exg)
return g:CheckWithSumEqual(Card.GetSynchroLevel,lv,1,1,syncard)
end
function c511000806.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc)
local c=e:GetHandler()
local lv=syncard:GetLevel()-c:GetLevel()
local g=Duel.GetMatchingGroup(c511000806.synfilter1,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local exg=Duel.GetMatchingGroup(c511000806.synfilter2,syncard:GetControler(),LOCATION_GRAVE,0,c,syncard,c,f)
g:Merge(exg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,1,1,syncard)
Duel.SetSynchroMaterial(sg)
end
--Hellfire Boatwatcher, Ghost Charon
function c511000806.initial_effect(c)
--synchro custom
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetTarget(c511000806.syntg)
e1:SetValue(1)
e1:SetOperation(c511000806.synop)
c:RegisterEffect(e1)
end
function c511000806.synfilter1(c,syncard,tuner,f)
return c:IsFaceup() and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c))
end
function c511000806.synfilter2(c,syncard,tuner,f)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c))
end
function c511000806.syntg(e,syncard,f,minc,maxc)
local c=e:GetHandler()
local lv=syncard:GetLevel()-c:GetLevel()
if lv<=0 then return false end
local g1=Duel.GetMatchingGroup(c511000806.synfilter1,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local g2=Duel.GetMatchingGroup(c511000806.synfilter2,syncard:GetControler(),LOCATION_GRAVE,0,c,syncard,c,f)
local res1=minc<=1 and g2:CheckWithSumEqual(Card.GetSynchroLevel,lv,1,1,syncard)
local res2=g1:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard)
return res1 or res2
end
function c511000806.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc)
local c=e:GetHandler()
local lv=syncard:GetLevel()-c:GetLevel()
local g1=Duel.GetMatchingGroup(c511000806.synfilter1,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,c,f)
local g2=Duel.GetMatchingGroup(c511000806.synfilter2,syncard:GetControler(),LOCATION_GRAVE,0,c,syncard,c,f)
local res=g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard)
local res2=minc<=1 and g2:CheckWithSumEqual(Card.GetSynchroLevel,lv,1,1,syncard)
local sg=nil
if (res2 and res and Duel.SelectYesNo(tp,aux.Stringid(61965407,0)))
or (res2 and not res) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
sg=g2:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,1,1,syncard)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard)
end
Duel.SetSynchroMaterial(sg)
end
19 changes: 17 additions & 2 deletions script/c511000991.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,21 @@ function c511000991.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c511000991.operation)
c:RegisterEffect(e2)
--30459350 chk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(511000991)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
c:RegisterEffect(e3)
end
function c511000991.filter(c)
return c:IsLevelAbove(5) and c:GetFlagEffect(511000991)==0
end
function c511000991.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsLevelAbove,0,0xff,0xff,nil,5)
local g=Duel.GetMatchingGroup(c511000991.filter,0,0xff,0xff,nil,5)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
Expand All @@ -34,11 +45,13 @@ function c511000991.operation(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e4:SetCode(EVENT_ADJUST)
e4:SetRange(0xff)
e4:SetOperation(c511000991.resetop)
e4:SetReset(RESET_EVENT+0x1fe0001)
tc:RegisterEffect(e4)
tc:RegisterFlagEffect(511000991,RESET_EVENT+0x1fe0001,0,0)
tc=g:GetNext()
end
end
Expand All @@ -53,5 +66,7 @@ function c511000991.costop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(0)
end
function c511000991.resetop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetEffect(0x1,RESET_EVENT)
if not Duel.IsPlayerAffectedByEffect(tp,511000991) then
e:GetHandler():ResetEffect(0x1,RESET_EVENT)
end
end
142 changes: 71 additions & 71 deletions script/c511001048.lua
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
--DDD疾風王アレクサンダー
function c511001048.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,987311)
e1:SetCondition(c511001048.spcon)
e1:SetTarget(c511001048.sptg)
e1:SetOperation(c511001048.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(511001048,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,987312)
e2:SetCondition(c511001048.descon)
e2:SetTarget(c511001048.destg)
e2:SetOperation(c511001048.desop)
c:RegisterEffect(e2)
end
function c511001048.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xaf)
end
function c511001048.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c511001048.cfilter,1,nil)
end
function c511001048.spfilter(c,e,tp)
return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c511001048.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c511001048.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c511001048.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c511001048.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c511001048.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
function c511001048.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsReason(REASON_BATTLE)
end
function c511001048.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c511001048.desop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--DDD疾風王アレクサンダー
function c511001048.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,987311)
e1:SetCondition(c511001048.spcon)
e1:SetTarget(c511001048.sptg)
e1:SetOperation(c511001048.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(511001048,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,987312)
e2:SetCondition(c511001048.descon)
e2:SetTarget(c511001048.destg)
e2:SetOperation(c511001048.desop)
c:RegisterEffect(e2)
end
function c511001048.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xaf)
end
function c511001048.spcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c511001048.cfilter,1,nil)
end
function c511001048.spfilter(c,e,tp)
return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c511001048.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c511001048.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c511001048.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c511001048.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c511001048.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c511001048.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsReason(REASON_BATTLE)
end
function c511001048.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c511001048.desop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
2 changes: 1 addition & 1 deletion script/c511001611.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function c511001611.activate(e,tp,eg,ep,ev,re,r,rp)
local nt=Duel.GetMatchingGroup(c511001611.afilter,tp,LOCATION_EXTRA,0,nil)
local spg=Duel.GetMatchingGroup(c511001611.spfilterchk,tp,LOCATION_EXTRA,0,nil,e,tp,nt)
local spg2=Duel.GetMatchingGroup(c511001611.spfilterchk2,tp,LOCATION_EXTRA,0,nil,e,tp,nt)
if spg:GetCount()<=0 or spg:GetCount()<=0 then return end
if spg:GetCount()<=0 and spg2:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=nt:Select(tp,1,99,nil)
while not Duel.IsExistingMatchingCard(c511001611.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sg,sg:GetSum(c511001611.numfilter)) do
Expand Down