Commit 0bbfa7bd authored by wind2009's avatar wind2009

Merge branch 'LEDE+YOS1+VJ+MZMI' into master

parents 55de85a0 4cca5c03
...@@ -31,7 +31,7 @@ function c10352095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -31,7 +31,7 @@ function c10352095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local rc=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute()) local rc=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~g:GetFirst():GetAttribute())
e:GetLabelObject():SetLabel(rc) e:GetLabelObject():SetLabel(rc)
e:GetHandler():SetHint(CHINT_ATTRIBUTE,rc) e:GetHandler():SetHint(CHINT_ATTRIBUTE,rc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
......
--粛声なる竜神サフィラ --粛声なる竜神サフィラ
function c101204034.initial_effect(c) function c10804018.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204034,0)) e1:SetDescription(aux.Stringid(10804018,0))
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101204034) e1:SetCountLimit(1,10804018)
e1:SetCondition(c101204034.drcon) e1:SetCondition(c10804018.drcon)
e1:SetTarget(c101204034.drtg) e1:SetTarget(c10804018.drtg)
e1:SetOperation(c101204034.drop) e1:SetOperation(c10804018.drop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101204034,1)) e2:SetDescription(aux.Stringid(10804018,1))
e2:SetCategory(CATEGORY_HANDES) e2:SetCategory(CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101204134) e2:SetCountLimit(1,10804019)
e2:SetCondition(c101204034.hscon) e2:SetCondition(c10804018.hscon)
e2:SetTarget(c101204034.hstg) e2:SetTarget(c10804018.hstg)
e2:SetOperation(c101204034.hsop) e2:SetOperation(c10804018.hsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101204034,2)) e3:SetDescription(aux.Stringid(10804018,2))
e3:SetCategory(CATEGORY_TOHAND) e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1,101204234) e3:SetCountLimit(1,10804020)
e3:SetCondition(c101204034.thcon) e3:SetCondition(c10804018.thcon)
e3:SetTarget(c101204034.thtg) e3:SetTarget(c10804018.thtg)
e3:SetOperation(c101204034.thop) e3:SetOperation(c10804018.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101204034.cfilter(c) function c10804018.cfilter(c)
return c:IsFaceupEx() and c:IsCode(25801745) return c:IsFaceupEx() and c:IsCode(25801745)
end end
function c101204034.drcon(e,tp,eg,ep,ev,re,r,rp) function c10804018.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c101204034.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c10804018.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101204034.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return Duel.IsExistingMatchingCard(c10804018.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end end
function c101204034.drop(e,tp,eg,ep,ev,re,r,rp) function c10804018.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.Draw(p,2,REASON_EFFECT)==2 then if Duel.Draw(p,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(p) Duel.ShuffleHand(p)
...@@ -56,37 +56,37 @@ function c101204034.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,37 +56,37 @@ function c101204034.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end end
end end
function c101204034.filter(c) function c10804018.filter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and (c:IsRace(RACE_DRAGON) or c:IsRace(RACE_WARRIOR)) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsFaceup() and c:IsType(TYPE_RITUAL) and (c:IsRace(RACE_DRAGON) or c:IsRace(RACE_WARRIOR)) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
function c101204034.hscon(e,tp,eg,ep,ev,re,r,rp) function c10804018.hscon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return c101204034.filter(a) or (d and c101204034.filter(d)) return c10804018.filter(a) or (d and c10804018.filter(d))
end end
function c101204034.hstg(e,tp,eg,ep,ev,re,r,rp,chk) function c10804018.hstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
end end
function c101204034.hsop(e,tp,eg,ep,ev,re,r,rp) function c10804018.hsop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local sg=g:RandomSelect(tp,1) local sg=g:RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end end
function c101204034.thcon(e,tp,eg,ep,ev,re,r,rp) function c10804018.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c101204034.thfilter(c) function c10804018.thfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end end
function c101204034.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c10804018.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101204034.thfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c10804018.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end end
function c101204034.thop(e,tp,eg,ep,ev,re,r,rp) function c10804018.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101204034.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c10804018.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -30,7 +30,7 @@ function c12421694.initial_effect(c) ...@@ -30,7 +30,7 @@ function c12421694.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c12421694.matfilter(c) function c12421694.matfilter(c)
return c:IsLinkSetCard(0x1115) and c:IsLinkAttribute(ATTRIBUTE_ALL-ATTRIBUTE_EARTH) return c:IsLinkSetCard(0x1115) and c:IsLinkAttribute(ATTRIBUTE_ALL&~ATTRIBUTE_EARTH)
end end
function c12421694.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c12421694.atktg(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:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
......
...@@ -42,7 +42,7 @@ function c1259814.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function c1259814.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE) e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_ALL-ATTRIBUTE_DIVINE) e1:SetValue(ATTRIBUTE_EARTH+ATTRIBUTE_WATER+ATTRIBUTE_FIRE+ATTRIBUTE_WIND+ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
...@@ -58,7 +58,7 @@ end ...@@ -58,7 +58,7 @@ end
function c18214905.atttg(e,tp,eg,ep,ev,re,r,rp,chk) function c18214905.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute()) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~e:GetHandler():GetAttribute())
e:SetLabel(att) e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end end
......
...@@ -32,7 +32,8 @@ end ...@@ -32,7 +32,8 @@ end
function c18482591.aclimset(e,tp,eg,ep,ev,re,r,rp) function c18482591.aclimset(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
while tc do while tc do
tc:RegisterFlagEffect(18482591,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1) local reset=tc:IsControler(tp) and RESET_OPPO_TURN or RESET_SELF_TURN
tc:RegisterFlagEffect(18482591,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+reset,0,1)
tc=eg:GetNext() tc=eg:GetNext()
end end
end end
...@@ -19,22 +19,28 @@ function s.initial_effect(c) ...@@ -19,22 +19,28 @@ function s.initial_effect(c)
--cannot remove --cannot remove
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_REMOVE) e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetTargetRange(1,1) e2:SetTargetRange(1,1)
e2:SetTarget(s.efilter) e2:SetTarget(s.efilter)
c:RegisterEffect(e2)
--remove and tograve
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DECKDES) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o) e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCost(s.recost) e3:SetTarget(s.eftg)
e3:SetTarget(s.retg) e3:SetLabelObject(e2)
e3:SetOperation(s.reop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--remove and tograve
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DECKDES)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+o)
e4:SetCost(s.recost)
e4:SetTarget(s.retg)
e4:SetOperation(s.reop)
c:RegisterEffect(e4)
end end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp) function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
...@@ -58,8 +64,10 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,8 +64,10 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.efilter(e,c,rp,r,re) function s.efilter(e,c,rp,r,re)
local tp=e:GetHandlerPlayer() return c==e:GetHandler() and r&REASON_EFFECT>0
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x38) and re and r&REASON_EFFECT>0 end
function s.eftg(e,c)
return c:IsSetCard(0x38) and c:IsFaceup()
end end
function s.refilter(c) function s.refilter(c)
return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x38) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
...@@ -84,4 +92,4 @@ end ...@@ -84,4 +92,4 @@ end
function s.reop(e,tp,eg,ep,ev,re,r,rp) function s.reop(e,tp,eg,ep,ev,re,r,rp)
local label,count=e:GetLabel() local label,count=e:GetLabel()
Duel.DiscardDeck(tp,count,REASON_EFFECT) Duel.DiscardDeck(tp,count,REASON_EFFECT)
end end
\ No newline at end of file
--燦幻超龍ドランセンド·ドラギオン --燦幻超龍ドランセンド·ドラギオン
function c101204040.initial_effect(c) function c18969888.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_DRAGON),1) aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_DRAGON),1)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204040,0)) e1:SetDescription(aux.Stringid(18969888,0))
e1:SetCategory(CATEGORY_POSITION) e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c101204040.poscon) e1:SetCondition(c18969888.poscon)
e1:SetTarget(c101204040.postg) e1:SetTarget(c18969888.postg)
e1:SetOperation(c101204040.posop) e1:SetOperation(c18969888.posop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
...@@ -25,43 +25,43 @@ function c101204040.initial_effect(c) ...@@ -25,43 +25,43 @@ function c101204040.initial_effect(c)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetValue(1) e3:SetValue(1)
e3:SetCondition(c101204040.actcon) e3:SetCondition(c18969888.actcon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101204040,2)) e4:SetDescription(aux.Stringid(18969888,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_BATTLE_START+TIMING_ATTACK+TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e4:SetHintTiming(0,TIMING_BATTLE_START+TIMING_ATTACK+TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,101204040+EFFECT_COUNT_CODE_DUEL) e4:SetCountLimit(1,18969888+EFFECT_COUNT_CODE_DUEL)
e4:SetCondition(c101204040.spcon) e4:SetCondition(c18969888.spcon)
e4:SetCost(c101204040.spcost) e4:SetCost(c18969888.spcost)
e4:SetTarget(c101204040.sptg) e4:SetTarget(c18969888.sptg)
e4:SetOperation(c101204040.spop) e4:SetOperation(c18969888.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not c101204040.global_check then if not c18969888.global_check then
c101204040.global_check=true c18969888.global_check=true
local ge1=Effect.GlobalEffect() local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE) ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetOperation(c101204040.checkop) ge1:SetOperation(c18969888.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function c101204040.checkop(e,tp,eg,ep,ev,re,r,rp) function c18969888.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,101204040,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,18969888,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1-tp,101204040,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(1-tp,18969888,RESET_PHASE+PHASE_END,0,1)
end end
function c101204040.poscon(e,tp,eg,ep,ev,re,r,rp) function c18969888.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c101204040.postg(e,tp,eg,ep,ev,re,r,rp,chk) function c18969888.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0)
end end
function c101204040.posop(e,tp,eg,ep,ev,re,r,rp) function c18969888.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if sg:GetCount()>0 then if sg:GetCount()>0 then
...@@ -72,30 +72,30 @@ function c101204040.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,30 +72,30 @@ function c101204040.posop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c101204040.actcon(e) function c18969888.actcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c101204040.spcon(e,tp,eg,ep,ev,re,r,rp) function c18969888.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,101204040)>=3 return Duel.GetFlagEffect(tp,18969888)>=3
end end
function c101204040.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c18969888.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return true end if chk==0 then return true end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204040,4)) e1:SetDescription(aux.Stringid(18969888,4))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c101204040.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c18969888.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 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) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c101204040.spop(e,tp,eg,ep,ev,re,r,rp) function c18969888.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101204040,3)) then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(18969888,3)) then
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):Select(tp,1,1,nil) local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):Select(tp,1,1,nil)
if #g>0 then if #g>0 then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -56,7 +56,7 @@ end ...@@ -56,7 +56,7 @@ end
function c19036557.atttg(e,tp,eg,ep,ev,re,r,rp,chk) function c19036557.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute()) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~e:GetHandler():GetAttribute())
e:SetLabel(att) e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end end
......
...@@ -17,7 +17,7 @@ function c20127343.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -17,7 +17,7 @@ function c20127343.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute()) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~g:GetFirst():GetAttribute())
e:SetLabel(att) e:SetLabel(att)
end end
function c20127343.cosop(e,tp,eg,ep,ev,re,r,rp) function c20127343.cosop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -37,7 +37,7 @@ function c20426176.atrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -37,7 +37,7 @@ function c20426176.atrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute()) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~g:GetFirst():GetAttribute())
e:SetLabel(att) e:SetLabel(att)
end end
function c20426176.thfilter(c,e,tp,ft) function c20426176.thfilter(c,e,tp,ft)
......
...@@ -32,7 +32,7 @@ function c22125101.initial_effect(c) ...@@ -32,7 +32,7 @@ function c22125101.initial_effect(c)
c22125101.global_check=true c22125101.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS) ge1:SetCode(EVENT_SPSUMMON_SUCCESS_G_P)
ge1:SetOperation(c22125101.checkop) ge1:SetOperation(c22125101.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
......
--破壊竜ガンドラG --破壊竜ガンドラG
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204051) aux.AddCodeList(c,79791878)
--atk gain --atk gain
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -38,7 +38,7 @@ function s.value(e,c) ...@@ -38,7 +38,7 @@ function s.value(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED)*300 return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED)*300
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsCode(101204051) and c:IsFaceup() return c:IsCode(79791878) and c:IsFaceup()
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
...@@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return aux.IsCodeListed(c,101204051) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(7) return aux.IsCodeListed(c,79791878) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(7)
end end
function s.descon(e,tp,eg,ep,ev,re,r,rp) function s.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
......
...@@ -66,7 +66,7 @@ function c25704359.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,7 +66,7 @@ function c25704359.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
att=bit.band(att,tc:GetOriginalAttribute()) att=bit.band(att,tc:GetOriginalAttribute())
tc=g:GetNext() tc=g:GetNext()
end end
att=ATTRIBUTE_ALL-att att=ATTRIBUTE_ALL&~att
e:SetLabel(att) e:SetLabel(att)
return Duel.IsExistingMatchingCard(c25704359.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,att) return Duel.IsExistingMatchingCard(c25704359.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,att)
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
--Coded by Lee --Coded by Lee
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204051) aux.AddCodeList(c,79791878)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -44,14 +44,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,14 +44,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
end end
function s.atkfilter(c) function s.atkfilter(c)
return (c:IsCode(101204051) or (aux.IsCodeListed(c,101204051) and c:IsLocation(LOCATION_MZONE))) and c:IsFaceup() return (c:IsCode(79791878) or (aux.IsCodeListed(c,79791878) and c:IsLocation(LOCATION_MZONE))) and c:IsFaceup()
end end
function s.atkval(e,c) function s.atkval(e,c)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroupCount(s.atkfilter,tp,LOCATION_ONFIELD,0,nil)*1000 return Duel.GetMatchingGroupCount(s.atkfilter,tp,LOCATION_ONFIELD,0,nil)*1000
end end
function s.filter(c) function s.filter(c)
return c:IsCode(101204051) and c:IsFaceup() return c:IsCode(79791878) and c:IsFaceup()
end end
function s.descon(e,tp,eg,ep,ev,re,r,rp) function s.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.GetAttacker():IsControler(1-tp) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil)
......
--古代の機械司令 --古代の機械司令
function c101204008.initial_effect(c) function c27483935.initial_effect(c)
aux.AddCodeList(c,83104731) aux.AddCodeList(c,83104731)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204008,0)) e1:SetDescription(aux.Stringid(27483935,0))
e1:SetCategory(CATEGORY_SUMMON) e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101204008) e1:SetCountLimit(1,27483935)
e1:SetCost(c101204008.scost) e1:SetCost(c27483935.scost)
e1:SetTarget(c101204008.stg) e1:SetTarget(c27483935.stg)
e1:SetOperation(c101204008.sop) e1:SetOperation(c27483935.sop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101204008,1)) e2:SetDescription(aux.Stringid(27483935,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101204108) e2:SetCountLimit(1,27483936)
e2:SetCondition(c101204008.spcon) e2:SetCondition(c27483935.spcon)
e2:SetTarget(c101204008.sptg) e2:SetTarget(c27483935.sptg)
e2:SetOperation(c101204008.spop) e2:SetOperation(c27483935.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101204008,2)) e4:SetDescription(aux.Stringid(27483935,2))
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,101204208) e4:SetCountLimit(1,27483937)
e4:SetCost(aux.bfgcost) e4:SetCost(aux.bfgcost)
e4:SetTarget(c101204008.tftg) e4:SetTarget(c27483935.tftg)
e4:SetOperation(c101204008.tfop) e4:SetOperation(c27483935.tfop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c101204008.costfilter(c,tp) function c27483935.costfilter(c,tp)
return c:IsCode(83104731) and c:IsAbleToGraveAsCost() return c:IsCode(83104731) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c101204008.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c) and Duel.IsExistingMatchingCard(c27483935.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c)
end end
function c101204008.scost(e,tp,eg,ep,ev,re,r,rp,chk) function c27483935.scost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101204008.costfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c27483935.costfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101204008.costfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c27483935.costfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c101204008.stg(e,tp,eg,ep,ev,re,r,rp,chk) function c27483935.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101204008.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c27483935.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end end
function c101204008.sumfilter(c) function c27483935.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsSetCard(0x7) return c:IsSummonable(true,nil) and c:IsSetCard(0x7)
end end
function c101204008.sop(e,tp,eg,ep,ev,re,r,rp) function c27483935.sop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c101204008.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c27483935.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.Summon(tp,tc,true,nil) Duel.Summon(tp,tc,true,nil)
end end
end end
function c101204008.cfilter(c) function c27483935.cfilter(c)
return c:IsFaceup() and c:IsCode(83104731) return c:IsFaceup() and c:IsCode(83104731)
end end
function c101204008.spcon(e,tp,eg,ep,ev,re,r,rp) function c27483935.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101204008.cfilter,1,nil) return eg:IsExists(c27483935.cfilter,1,nil)
end end
function c101204008.filter1(c,e,tp) function c27483935.filter1(c,e,tp)
return c:IsCode(83104731) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsCode(83104731) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function c101204008.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c27483935.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101204008.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c27483935.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c101204008.spop(e,tp,eg,ep,ev,re,r,rp) function c27483935.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101204008.filter1),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c27483935.filter1),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end end
end end
function c101204008.pfilter(c,tp) function c27483935.pfilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsSetCard(0x7) return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsSetCard(0x7)
and not c:IsForbidden() and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function c101204008.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function c27483935.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c101204008.pfilter,tp,LOCATION_HAND,0,1,nil,tp) end and Duel.IsExistingMatchingCard(c27483935.pfilter,tp,LOCATION_HAND,0,1,nil,tp) end
end end
function c101204008.tfop(e,tp,eg,ep,ev,re,r,rp) function c27483935.tfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c101204008.pfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c27483935.pfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst()
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end end
\ No newline at end of file
...@@ -18,32 +18,17 @@ function c27564031.initial_effect(c) ...@@ -18,32 +18,17 @@ function c27564031.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c27564031.condition(e,tp,eg,ep,ev,re,r,rp) function c27564031.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c27564031.filter(c) function c27564031.filter(c)
return c:IsSetCard(0x23) and c:IsAbleToHand() return c:IsSetCard(0x23) and c:IsAbleToHand()
end end
function c27564031.target(e,tp,eg,ep,ev,re,r,rp,chk) function c27564031.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27564031.filter,tp,LOCATION_DECK,0,3,nil) end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.IsExistingMatchingCard(c27564031.filter,tp,LOCATION_DECK,0,3,nil) end
local dt=Duel.GetDrawCount(tp) aux.GiveUpNormalDraw(e,tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
function c27564031.operation(e,tp,eg,ep,ev,re,r,rp) function c27564031.operation(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c27564031.filter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c27564031.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=3 then if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -33,31 +33,17 @@ function c27979109.initial_effect(c) ...@@ -33,31 +33,17 @@ function c27979109.initial_effect(c)
end end
c27979109.has_text_type=TYPE_DUAL c27979109.has_text_type=TYPE_DUAL
function c27979109.thcon(e,tp,eg,ep,ev,re,r,rp) function c27979109.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetDrawCount(tp)>0 return tp==Duel.GetTurnPlayer()
end end
function c27979109.thfilter(c) function c27979109.thfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() return c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end end
function c27979109.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c27979109.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27979109.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.IsExistingMatchingCard(c27979109.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local dt=Duel.GetDrawCount(tp) aux.GiveUpNormalDraw(e,tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end end
function c27979109.thop(e,tp,eg,ep,ev,re,r,rp) function c27979109.thop(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c27979109.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c27979109.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
--超熱血本塁打王
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(aux.bdocon)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--幻奏協奏曲 --幻奏協奏曲
function c101204056.initial_effect(c) function c31458630.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101204056) e1:SetCountLimit(1,31458630)
e1:SetTarget(c101204056.target) e1:SetTarget(c31458630.target)
e1:SetOperation(c101204056.activate) e1:SetOperation(c31458630.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101204056,1)) e2:SetDescription(aux.Stringid(31458630,1))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101204156) e2:SetCountLimit(1,31458631)
e2:SetCondition(c101204056.drcon) e2:SetCondition(c31458630.drcon)
e2:SetTarget(c101204056.drtg) e2:SetTarget(c31458630.drtg)
e2:SetOperation(c101204056.drop) e2:SetOperation(c31458630.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101204056.filter0(c,e) function c31458630.filter0(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function c101204056.filter1(c,e) function c31458630.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function c101204056.filter2(c,e,tp,m,f,chkf) function c31458630.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_FAIRY) and (not f or f(c)) return c:IsType(TYPE_FUSION) and c:IsRace(RACE_FAIRY) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c101204056.target(e,tp,eg,ep,ev,re,r,rp,chk) function c31458630.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp)
mg1:Merge(Duel.GetMatchingGroup(c101204056.filter0,tp,LOCATION_PZONE,0,nil,e)) mg1:Merge(Duel.GetMatchingGroup(c31458630.filter0,tp,LOCATION_PZONE,0,nil,e))
local res=Duel.IsExistingMatchingCard(c101204056.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(c31458630.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101204056.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) res=Duel.IsExistingMatchingCard(c31458630.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c101204056.activate(e,tp,eg,ep,ev,re,r,rp) function c31458630.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101204056.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(c31458630.filter1,nil,e)
mg1:Merge(Duel.GetMatchingGroup(c101204056.filter0,tp,LOCATION_PZONE,0,nil,e)) mg1:Merge(Duel.GetMatchingGroup(c31458630.filter0,tp,LOCATION_PZONE,0,nil,e))
local sg1=Duel.GetMatchingGroup(c101204056.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c31458630.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -62,7 +62,7 @@ function c101204056.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function c101204056.activate(e,tp,eg,ep,ev,re,r,rp)
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c101204056.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) sg2=Duel.GetMatchingGroup(c31458630.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
...@@ -84,20 +84,20 @@ function c101204056.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,20 +84,20 @@ function c101204056.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
function c101204056.cfilter(c,tp) function c31458630.cfilter(c,tp)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9b) and c:IsControler(tp) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9b) and c:IsControler(tp)
end end
function c101204056.drcon(e,tp,eg,ep,ev,re,r,rp) function c31458630.drcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c101204056.cfilter,1,nil,tp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(c31458630.cfilter,1,nil,tp)
end end
function c101204056.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c31458630.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and c:IsAbleToDeck() end and c:IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c101204056.drop(e,tp,eg,ep,ev,re,r,rp) function c31458630.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0
and c:IsLocation(LOCATION_DECK) then and c:IsLocation(LOCATION_DECK) then
......
--仲間の絆 --仲間の絆
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204051) aux.AddCodeList(c,79791878)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -14,17 +14,17 @@ function s.initial_effect(c) ...@@ -14,17 +14,17 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.cfilter1(c) function s.cfilter1(c)
return c:IsFaceup() and c:IsCode(101204051) return c:IsFaceup() and c:IsCode(79791878)
end end
function s.cfilter2(c) function s.cfilter2(c)
return c:IsFaceup() and aux.IsCodeListed(c,101204051) return c:IsFaceup() and aux.IsCodeListed(c,79791878)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return aux.IsCodeListed(c,101204051) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4) return aux.IsCodeListed(c,79791878) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -24,30 +24,17 @@ function c36623431.initial_effect(c) ...@@ -24,30 +24,17 @@ function c36623431.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c36623431.condition1(e,tp,eg,ep,ev,re,r,rp) function c36623431.condition1(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c36623431.target1(e,tp,eg,ep,ev,re,r,rp,chk) function c36623431.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and e:GetHandler():IsAbleToHand() end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c36623431.operation1(e,tp,eg,ep,ev,re,r,rp) function c36623431.operation1(e,tp,eg,ep,ev,re,r,rp)
if not aux.IsPlayerCanNormalDraw(tp) then return end
aux.GiveUpNormalDraw(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if c:IsRelateToEffect(e) then
if aux.DrawReplaceCount<=aux.DrawReplaceMax and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
end end
......
...@@ -71,7 +71,7 @@ function s.eqlimit(e,c) ...@@ -71,7 +71,7 @@ function s.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x2ac) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x1ac) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -26,7 +26,7 @@ function c38049541.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -26,7 +26,7 @@ function c38049541.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c38049541.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c38049541.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute()) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~g:GetFirst():GetAttribute())
e:SetLabel(att) e:SetLabel(att)
end end
function c38049541.cosop(e,tp,eg,ep,ev,re,r,rp) function c38049541.cosop(e,tp,eg,ep,ev,re,r,rp)
......
--マシマシュマロン --マシマシュマロン
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204051) aux.AddCodeList(c,79791878)
--battle indestructable --battle indestructable
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -45,7 +45,7 @@ function s.initial_effect(c) ...@@ -45,7 +45,7 @@ function s.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.indesfilter(c) function s.indesfilter(c)
return c:IsFaceup() and c:IsCode(101204051) return c:IsFaceup() and c:IsCode(79791878)
end end
function s.indescon(e) function s.indescon(e)
return Duel.IsExistingMatchingCard(s.indesfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(s.indesfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
......
--粛声なる祝福 --粛声なる祝福
function c101204062.initial_effect(c) function c39114494.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101204062,1)) e2:SetDescription(aux.Stringid(39114494,1))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101204062) e2:SetCountLimit(1,39114494)
e2:SetTarget(c101204062.thtg) e2:SetTarget(c39114494.thtg)
e2:SetOperation(c101204062.thop) e2:SetOperation(c39114494.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101204062,2)) e3:SetDescription(aux.Stringid(39114494,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101204162) e3:SetCountLimit(1,39114495)
e3:SetCondition(c101204062.ricon) e3:SetCondition(c39114494.ricon)
e3:SetTarget(c101204062.ritg) e3:SetTarget(c39114494.ritg)
e3:SetOperation(c101204062.riop) e3:SetOperation(c39114494.riop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c101204062.filter(c,e,tp) function c39114494.filter(c,e,tp)
return not c:IsCode(101204062) and c:IsFaceupEx() and c:IsSetCard(0x1a6) and c:IsAbleToHand() return not c:IsCode(39114494) and c:IsFaceupEx() and c:IsSetCard(0x1a6) and c:IsAbleToHand()
end end
function c101204062.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c39114494.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c101204062.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c39114494.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101204062.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c39114494.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectTarget(tp,c101204062.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectTarget(tp,c39114494.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then if tc:IsLocation(LOCATION_GRAVE) then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION) e:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
...@@ -44,34 +44,34 @@ function c101204062.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -44,34 +44,34 @@ function c101204062.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetCategory(CATEGORY_TOHAND) e:SetCategory(CATEGORY_TOHAND)
end end
end end
function c101204062.thop(e,tp,eg,ep,ev,re,r,rp) function c39114494.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
if tc then if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
function c101204062.cfilter(c) function c39114494.cfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_RITUAL) return c:IsFaceup() and not c:IsType(TYPE_RITUAL)
end end
function c101204062.ricon(e,tp,eg,ep,ev,re,r,rp) function c39114494.ricon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101204062.cfilter,1,nil) return eg:IsExists(c39114494.cfilter,1,nil)
end end
function c101204062.rfilter(c,e,tp) function c39114494.rfilter(c,e,tp)
return c:IsType(TYPE_RITUAL) and (c:IsRace(RACE_DRAGON) or c:IsRace(RACE_WARRIOR)) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsType(TYPE_RITUAL) and (c:IsRace(RACE_DRAGON) or c:IsRace(RACE_WARRIOR)) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
function c101204062.ritg(e,tp,eg,ep,ev,re,r,rp,chk) function c39114494.ritg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,c101204062.rfilter,e,tp,mg,nil,Card.GetLevel,"Greater") return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,c39114494.rfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c101204062.riop(e,tp,eg,ep,ev,re,r,rp) function c39114494.riop(e,tp,eg,ep,ev,re,r,rp)
::cancel:: ::cancel::
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,c101204062.rfilter,e,tp,mg,nil,Card.GetLevel,"Greater") local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,c39114494.rfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
...@@ -91,7 +91,7 @@ function c101204062.riop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,7 +91,7 @@ function c101204062.riop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
if Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) then if Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(101204062,3)) e1:SetDescription(aux.Stringid(39114494,3))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
......
--サイレント・ソードマン・ゼロ --サイレント・ソードマン・ゼロ
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204051) aux.AddCodeList(c,79791878)
--level up --level up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
...@@ -48,7 +48,7 @@ function s.value(e,c) ...@@ -48,7 +48,7 @@ function s.value(e,c)
return math.max(0,c:GetLevel()-c:GetOriginalLevel())*500 return math.max(0,c:GetLevel()-c:GetOriginalLevel())*500
end end
function s.tfilter(c,tp) function s.tfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD) and (aux.IsCodeListed(c,101204051) or c:IsCode(101204051)) return c:IsLocation(LOCATION_ONFIELD) and (aux.IsCodeListed(c,79791878) or c:IsCode(79791878))
and c:IsControler(tp) and c:IsFaceup() and c:IsControler(tp) and c:IsFaceup()
end end
function s.negcon(e,tp,eg,ep,ev,re,r,rp) function s.negcon(e,tp,eg,ep,ev,re,r,rp)
......
--天盃龍パイドラ --天盃龍パイドラ
local s,id,o=GetID() local s,id,o=GetID()
function c101204016.initial_effect(c) function c39931513.initial_effect(c)
--to hand or set --to hand or set
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
......
...@@ -14,7 +14,7 @@ function c40410110.attop(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,7 +14,7 @@ function c40410110.attop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local catt=c:GetAttribute() local catt=c:GetAttribute()
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-catt) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~catt)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
......
--古代の進軍 --古代の進軍
function c101204055.initial_effect(c) function c4064925.initial_effect(c)
aux.AddCodeList(c,83104731) aux.AddCodeList(c,83104731)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101204055+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,4064925+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c101204055.cost) e1:SetCost(c4064925.cost)
e1:SetTarget(c101204055.target) e1:SetTarget(c4064925.target)
e1:SetOperation(c101204055.activate) e1:SetOperation(c4064925.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101204055,0)) e2:SetDescription(aux.Stringid(4064925,0))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(c101204055.drcost) e2:SetCost(c4064925.drcost)
e2:SetTarget(c101204055.drtg) e2:SetTarget(c4064925.drtg)
e2:SetOperation(c101204055.drop) e2:SetOperation(c4064925.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not c101204055.global_check then if not c4064925.global_check then
c101204055.global_check=true c4064925.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SSET) ge1:SetCode(EVENT_SSET)
ge1:SetOperation(c101204055.checkop) ge1:SetOperation(c4064925.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone() local ge2=ge1:Clone()
ge2:SetCode(EVENT_MSET) ge2:SetCode(EVENT_MSET)
Duel.RegisterEffect(ge2,0) Duel.RegisterEffect(ge2,0)
local ge3=ge1:Clone() local ge3=ge1:Clone()
ge3:SetCode(EVENT_SPSUMMON_SUCCESS) ge3:SetCode(EVENT_SPSUMMON_SUCCESS)
ge3:SetCondition(c101204055.ssetcon) ge3:SetCondition(c4064925.ssetcon)
Duel.RegisterEffect(ge3,0) Duel.RegisterEffect(ge3,0)
end end
end end
function c101204055.checkop(e,tp,eg,ep,ev,re,r,rp) function c4064925.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,101204055,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(rp,4064925,RESET_PHASE+PHASE_END,0,1)
end end
function c101204055.cfilter(c) function c4064925.cfilter(c)
return c:IsFacedown() return c:IsFacedown()
end end
function c101204055.ssetcon(e,tp,eg,ep,ev,re,r,rp) function c4064925.ssetcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101204055.cfilter,1,nil) return eg:IsExists(c4064925.cfilter,1,nil)
end end
function c101204055.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c4064925.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,101204055)==0 end if chk==0 then return Duel.GetFlagEffect(tp,4064925)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
...@@ -63,59 +63,59 @@ function c101204055.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,59 +63,59 @@ function c101204055.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
local e4=e1:Clone() local e4=e1:Clone()
e4:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION) e4:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e4:SetTarget(c101204055.sumlimit) e4:SetTarget(c4064925.sumlimit)
Duel.RegisterEffect(e4,tp) Duel.RegisterEffect(e4,tp)
end end
function c101204055.sumlimit(e,c,sump,sumtype,sumpos,targetp) function c4064925.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0 return bit.band(sumpos,POS_FACEDOWN)>0
end end
function c101204055.filter(c) function c4064925.filter(c)
return not c:IsCode(101204055) and c:IsSetCard(0x7) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand() return not c:IsCode(4064925) and c:IsSetCard(0x7) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
end end
function c101204055.target(e,tp,eg,ep,ev,re,r,rp,chk) function c4064925.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101204055.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c4064925.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c101204055.activate(e,tp,eg,ep,ev,re,r,rp) function c4064925.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101204055.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c4064925.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c101204055.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function c4064925.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,nil,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,nil,1,1,nil,tp) local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c101204055.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c4064925.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c101204055.drop(e,tp,eg,ep,ev,re,r,rp) function c4064925.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 and Duel.GetFlagEffect(tp,101204155)==0 then if Duel.Draw(p,d,REASON_EFFECT)~=0 and Duel.GetFlagEffect(tp,4064926)==0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(101204055,2)) e1:SetDescription(aux.Stringid(4064925,2))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SUMMON_PROC) e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCountLimit(1,101204055) e1:SetCountLimit(1,4064925)
e1:SetCondition(c101204055.ntcon) e1:SetCondition(c4064925.ntcon)
e1:SetTarget(c101204055.nttg) e1:SetTarget(c4064925.nttg)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,101204155,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,4064926,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
end end
function c101204055.ntcon(e,c,minc) function c4064925.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
function c101204055.nttg(e,c) function c4064925.nttg(e,c)
return c:IsLevelAbove(5) and (c:IsCode(83104731) or aux.IsCodeListed(c,83104731)) return c:IsLevelAbove(5) and (c:IsCode(83104731) or aux.IsCodeListed(c,83104731))
end end
\ No newline at end of file
...@@ -41,7 +41,7 @@ function c43739056.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function c43739056.ctop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and Duel.GetControl(c,1-tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(43739056,0)) then if c:IsRelateToEffect(e) and Duel.GetControl(c,1-tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(43739056,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute()) local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~e:GetHandler():GetAttribute())
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
......
...@@ -66,7 +66,7 @@ function c45115956.attop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c45115956.attop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local catt=tc:GetAttribute() local catt=tc:GetAttribute()
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-catt) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~catt)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
--GP-アニヒレーター --GP-アニヒレーター
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204020) aux.AddCodeList(c,60203670)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -64,7 +64,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,7 +64,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsCode(101204020) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(60203670) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.tdop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -59,7 +59,7 @@ end ...@@ -59,7 +59,7 @@ end
function c45702014.atttg(e,tp,eg,ep,ev,re,r,rp,chk) function c45702014.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute()) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~e:GetHandler():GetAttribute())
e:SetLabel(att) e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end end
......
...@@ -64,12 +64,12 @@ function c45950291.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,12 +64,12 @@ function c45950291.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c45950291.thcon(e,tp,eg,ep,ev,re,r,rp) function c45950291.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c45950291.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c45950291.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
...@@ -78,38 +78,25 @@ function c45950291.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -78,38 +78,25 @@ function c45950291.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetTarget(c45950291.splimit) e1:SetTarget(c45950291.splimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
--cant spsummon from main deck check --cant spsummon from main deck check
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(63060238) e2:SetCode(63060238)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
aux.GiveUpNormalDraw(e,tp,EFFECT_FLAG_OATH)
end end
function c45950291.splimit(e,c,sump,sumtype,sumpos,targetp,se) function c45950291.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not se:GetHandler():IsCode(45950291) return not se:GetHandler():IsCode(45950291)
end end
function c45950291.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c45950291.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return e:GetHandler():IsAbleToHand() end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c45950291.thop(e,tp,eg,ep,ev,re,r,rp) function c45950291.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if c:IsRelateToEffect(e) then
if aux.DrawReplaceCount<=aux.DrawReplaceMax and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
end end
......
...@@ -57,7 +57,7 @@ end ...@@ -57,7 +57,7 @@ end
function c46425662.atttg(e,tp,eg,ep,ev,re,r,rp,chk) function c46425662.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute()) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~e:GetHandler():GetAttribute())
e:SetLabel(att) e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end end
......
...@@ -51,32 +51,19 @@ function c49681811.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,32 +51,19 @@ function c49681811.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c49681811.condition(e,tp,eg,ep,ev,re,r,rp) function c49681811.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c49681811.filter(c) function c49681811.filter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end end
function c49681811.target(e,tp,eg,ep,ev,re,r,rp,chk) function c49681811.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49681811.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.IsExistingMatchingCard(c49681811.filter,tp,LOCATION_DECK,0,1,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
function c49681811.operation(e,tp,eg,ep,ev,re,r,rp) function c49681811.operation(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if not aux.IsPlayerCanNormalDraw(tp) then return end
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end aux.GiveUpNormalDraw(e,tp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c49681811.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c49681811.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()~=0 then if g:GetCount()~=0 then
......
...@@ -47,37 +47,22 @@ function c49838105.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,37 +47,22 @@ function c49838105.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c49838105.cfcon(e,tp,eg,ep,ev,re,r,rp) function c49838105.cfcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetDrawCount(tp)>0 return tp==Duel.GetTurnPlayer()
end end
function c49838105.cftg(e,tp,eg,ep,ev,re,r,rp,chk) function c49838105.cftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) end
local dt=Duel.GetDrawCount(tp) aux.GiveUpNormalDraw(e,tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
end end
function c49838105.cfop(e,tp,eg,ep,ev,re,r,rp) function c49838105.cfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
aux.DrawReplaceCount=aux.DrawReplaceCount+1 Duel.ConfirmDecktop(tp,1)
if aux.DrawReplaceCount<=aux.DrawReplaceMax then local g=Duel.GetDecktopGroup(tp,1)
Duel.ConfirmDecktop(tp,1) local tc=g:GetFirst()
local g=Duel.GetDecktopGroup(tp,1) Duel.DisableShuffleCheck()
local tc=g:GetFirst() if tc:IsRace(RACE_PLANT) then
Duel.DisableShuffleCheck() Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL)
if tc:IsRace(RACE_PLANT) then else
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) Duel.SendtoHand(tc,nil,REASON_EFFECT)
else Duel.ShuffleHand(tp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
end
end end
end end
...@@ -85,30 +85,17 @@ function c50418970.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,30 +85,17 @@ function c50418970.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end end
function c50418970.retcon(e,tp,eg,ep,ev,re,r,rp) function c50418970.retcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c50418970.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c50418970.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and e:GetHandler():IsAbleToHand() end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c50418970.retop(e,tp,eg,ep,ev,re,r,rp) function c50418970.retop(e,tp,eg,ep,ev,re,r,rp)
if not aux.IsPlayerCanNormalDraw(tp) then return end
aux.GiveUpNormalDraw(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if c:IsRelateToEffect(e) then
if aux.DrawReplaceCount<=aux.DrawReplaceMax and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
end end
......
--古代の機械競闘 --古代の機械競闘
function c101204072.initial_effect(c) function c53541822.initial_effect(c)
aux.AddCodeList(c,83104731) aux.AddCodeList(c,83104731)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -10,8 +10,8 @@ function c101204072.initial_effect(c) ...@@ -10,8 +10,8 @@ function c101204072.initial_effect(c)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c101204072.indtg) e1:SetTarget(c53541822.indtg)
e1:SetValue(c101204072.efilter) e1:SetValue(c53541822.efilter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE)
...@@ -19,55 +19,55 @@ function c101204072.initial_effect(c) ...@@ -19,55 +19,55 @@ function c101204072.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,101204072) e2:SetCountLimit(1,53541822)
e2:SetCondition(c101204072.condition) e2:SetCondition(c53541822.condition)
e2:SetTarget(c101204072.target) e2:SetTarget(c53541822.target)
e2:SetOperation(c101204072.activate) e2:SetOperation(c53541822.activate)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101204072.indtg(e,c) function c53541822.indtg(e,c)
return c:IsCode(83104731) or aux.IsCodeListed(c,83104731) return c:IsCode(83104731) or aux.IsCodeListed(c,83104731)
end end
function c101204072.efilter(e,re) function c53541822.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated() and re:IsActiveType(TYPE_MONSTER)
end end
function c101204072.filter0(c) function c53541822.filter0(c)
return c:IsOnField() and c:IsAbleToRemove() return c:IsOnField() and c:IsAbleToRemove()
end end
function c101204072.filter1(c,e) function c53541822.filter1(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end end
function c101204072.filter2(c,e,tp,m,f,chkf) function c53541822.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and aux.IsCodeListed(c,83104731) and (not f or f(c)) return c:IsType(TYPE_FUSION) and aux.IsCodeListed(c,83104731) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c101204072.filter3(c) function c53541822.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end end
function c101204072.condition(e,tp,eg,ep,ev,re,r,rp) function c53541822.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil)
end end
function c101204072.fcheck(tp,sg,fc) function c53541822.fcheck(tp,sg,fc)
return sg:IsExists(c101204072.filter,1,nil) return sg:IsExists(c53541822.filter,1,nil)
end end
function c101204072.filter(c) function c53541822.filter(c)
return c:IsLocation(LOCATION_ONFIELD) and c:IsCode(83104731) return c:IsLocation(LOCATION_ONFIELD) and c:IsCode(83104731)
end end
function c101204072.target(e,tp,eg,ep,ev,re,r,rp,chk) function c53541822.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101204072.filter0,nil) local mg1=Duel.GetFusionMaterial(tp):Filter(c53541822.filter0,nil)
local mg2=Duel.GetMatchingGroup(c101204072.filter3,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(c53541822.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
aux.FCheckAdditional=c101204072.fcheck aux.FCheckAdditional=c53541822.fcheck
local res=Duel.IsExistingMatchingCard(c101204072.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(c53541822.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp) local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101204072.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf) res=Duel.IsExistingMatchingCard(c53541822.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end end
end end
aux.FCheckAdditional=nil aux.FCheckAdditional=nil
...@@ -77,13 +77,13 @@ function c101204072.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -77,13 +77,13 @@ function c101204072.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_MZONE)
end end
function c101204072.activate(e,tp,eg,ep,ev,re,r,rp) function c53541822.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101204072.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(c53541822.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c101204072.filter3,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(c53541822.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
aux.FCheckAdditional=c101204072.fcheck aux.FCheckAdditional=c53541822.fcheck
local sg1=Duel.GetMatchingGroup(c101204072.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c53541822.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil local mg3=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -91,7 +91,7 @@ function c101204072.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,7 +91,7 @@ function c101204072.activate(e,tp,eg,ep,ev,re,r,rp)
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp) mg3=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c101204072.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf) sg2=Duel.GetMatchingGroup(c53541822.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
...@@ -112,7 +112,7 @@ function c101204072.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -112,7 +112,7 @@ function c101204072.activate(e,tp,eg,ep,ev,re,r,rp)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(101204072,2)) e1:SetDescription(aux.Stringid(53541822,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetCode(EFFECT_EXTRA_ATTACK)
......
--The Legend of Tickets
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,1,nil)
end
function s.activate(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_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetOperation(s.tdop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
e1:SetValue(2)
Duel.RegisterEffect(e1,tp)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsHasEffect(EFFECT_NECRO_VALLEY) then
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_EFFECT)
end
end
\ No newline at end of file
...@@ -42,7 +42,7 @@ end ...@@ -42,7 +42,7 @@ end
function c54757758.atttg(e,tp,eg,ep,ev,re,r,rp,chk) function c54757758.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute()) local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~e:GetHandler():GetAttribute())
e:SetLabel(aat) e:SetLabel(aat)
end end
function c54757758.attop(e,tp,eg,ep,ev,re,r,rp) function c54757758.attop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -159,6 +159,7 @@ function c55795155.pop(e,tp,eg,ep,ev,re,r,rp) ...@@ -159,6 +159,7 @@ function c55795155.pop(e,tp,eg,ep,ev,re,r,rp)
sg:Merge(g) sg:Merge(g)
Duel.HintSelection(Group.FromCards(lpz)) Duel.HintSelection(Group.FromCards(lpz))
Duel.HintSelection(Group.FromCards(rpz)) Duel.HintSelection(Group.FromCards(rpz))
Duel.RaiseEvent(sg,EVENT_SPSUMMON_SUCCESS_G_P,e,REASON_EFFECT,tp,tp,0)
Duel.SpecialSummon(sg,SUMMON_TYPE_PENDULUM,tp,tp,true,true,POS_FACEUP) Duel.SpecialSummon(sg,SUMMON_TYPE_PENDULUM,tp,tp,true,true,POS_FACEUP)
e1:Reset() e1:Reset()
end end
......
...@@ -36,7 +36,7 @@ end ...@@ -36,7 +36,7 @@ end
function c56511382.desop(e,tp,eg,ep,ev,re,r,rp) function c56511382.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local lv=tc:GetLevel() local lv=tc:GetLevel()
if tc:IsRelateToEffect(e) and c56511382.desfilter(tc,tp) and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and c56511382.desfilter(tc,1-tp) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,lv*400,REASON_EFFECT) Duel.Damage(1-tp,lv*400,REASON_EFFECT)
end end
end end
...@@ -41,30 +41,17 @@ function c56856951.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,30 +41,17 @@ function c56856951.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end end
function c56856951.thcon(e,tp,eg,ep,ev,re,r,rp) function c56856951.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c56856951.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c56856951.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and e:GetHandler():IsAbleToHand() end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c56856951.thop(e,tp,eg,ep,ev,re,r,rp) function c56856951.thop(e,tp,eg,ep,ev,re,r,rp)
if not aux.IsPlayerCanNormalDraw(tp) then return end
aux.GiveUpNormalDraw(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if c:IsRelateToEffect(e) then
if aux.DrawReplaceCount<=aux.DrawReplaceMax and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
end end
......
--時の沈黙-ターン・サイレンス --時の沈黙-ターン・サイレンス
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204051) aux.AddCodeList(c,79791878)
--level up --level up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE) e1:SetCategory(CATEGORY_DISABLE)
...@@ -32,10 +32,10 @@ function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -32,10 +32,10 @@ function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function s.nfilter1(c) function s.nfilter1(c)
return c:IsFaceup() and c:IsCode(101204051) return c:IsFaceup() and c:IsCode(79791878)
end end
function s.nfilter2(c) function s.nfilter2(c)
return c:IsFaceup() and aux.IsCodeListed(c,101204051) return c:IsFaceup() and aux.IsCodeListed(c,79791878)
end end
function s.lvop(e,tp,eg,ep,ev,re,r,rp) function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
...@@ -60,7 +60,7 @@ function s.bacon(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function s.bacon(e,tp,eg,ep,ev,re,r,rp)
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
if not tc then return false end if not tc then return false end
e:SetLabelObject(tc) e:SetLabelObject(tc)
return tc:IsFaceup() and aux.IsCodeListed(tc,101204051) return tc:IsFaceup() and aux.IsCodeListed(tc,79791878)
end end
function s.baop(e,tp,eg,ep,ev,re,r,rp) function s.baop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -16,7 +16,7 @@ function c5908650.initial_effect(c) ...@@ -16,7 +16,7 @@ function c5908650.initial_effect(c)
end end
function c5908650.chainfilter(re,tp,cid) function c5908650.chainfilter(re,tp,cid)
local attr=Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_ATTRIBUTE) local attr=Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_ATTRIBUTE)
return not (re:IsActiveType(TYPE_MONSTER) and attr&(ATTRIBUTE_ALL-ATTRIBUTE_LIGHT)~=0) return not (re:IsActiveType(TYPE_MONSTER) and attr&(ATTRIBUTE_ALL&~ATTRIBUTE_LIGHT)~=0)
end end
function c5908650.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c5908650.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(5908650,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.GetCustomActivityCount(5908650,tp,ACTIVITY_CHAIN)==0 end
......
...@@ -50,37 +50,23 @@ function c59650656.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,37 +50,23 @@ function c59650656.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c59650656.spcon(e,tp,eg,ep,ev,re,r,rp) function c59650656.spcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c59650656.spfilter(c,e,tp) function c59650656.spfilter(c,e,tp)
return c:IsSetCard(0x7b) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x7b) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c59650656.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c59650656.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c59650656.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c59650656.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c59650656.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c59650656.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local dt=Duel.GetDrawCount(tp) aux.GiveUpNormalDraw(e,tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c59650656.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c59650656.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c59650656.spop(e,tp,eg,ep,ev,re,r,rp) function c59650656.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if tc:IsRelateToEffect(e) then
if aux.DrawReplaceCount<=aux.DrawReplaceMax and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -38,7 +38,7 @@ function c60226558.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -38,7 +38,7 @@ function c60226558.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c60226558.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c60226558.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute()) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~g:GetFirst():GetAttribute())
e:SetLabel(att) e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
......
...@@ -62,11 +62,32 @@ function c61405855.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -62,11 +62,32 @@ function c61405855.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local bc=e:GetHandler():GetEquipTarget():GetBattleTarget() local bc=e:GetHandler():GetEquipTarget():GetBattleTarget()
Duel.SetTargetCard(bc) Duel.SetTargetCard(bc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end end
function c61405855.desop(e,tp,eg,ep,ev,re,r,rp) function c61405855.desop(e,tp,eg,ep,ev,re,r,rp)
local bc=Duel.GetFirstTarget() local bc=Duel.GetFirstTarget()
if bc:IsRelateToEffect(e) then if bc:IsRelateToEffect(e) then
Duel.Destroy(bc,REASON_EFFECT) local c=e:GetHandler()
local fid=c:GetFieldID()
bc:RegisterFlagEffect(61405855,RESET_PHASE+PHASE_BATTLE+RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61405855,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(bc)
e1:SetCondition(c61405855.descon2)
e1:SetOperation(c61405855.desop2)
e1:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e1,tp)
end end
end end
function c61405855.descon2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:GetFlagEffectLabel(61405855)==e:GetLabel()
end
function c61405855.desop2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Hint(HINT_CARD,0,61405855)
Duel.Destroy(tc,REASON_EFFECT)
end
...@@ -24,7 +24,7 @@ function c63288573.initial_effect(c) ...@@ -24,7 +24,7 @@ function c63288573.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c63288573.matfilter(c) function c63288573.matfilter(c)
return c:IsLinkSetCard(0x1115) and c:IsLinkAttribute(ATTRIBUTE_ALL-ATTRIBUTE_FIRE) return c:IsLinkSetCard(0x1115) and c:IsLinkAttribute(ATTRIBUTE_ALL&~ATTRIBUTE_FIRE)
end end
function c63288573.atkval(e) function c63288573.atkval(e)
return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_SPELL)*100 return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_SPELL)*100
......
...@@ -29,32 +29,18 @@ function c64400161.initial_effect(c) ...@@ -29,32 +29,18 @@ function c64400161.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c64400161.condition(e,tp,eg,ep,ev,re,r,rp) function c64400161.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c64400161.thfilter(c) function c64400161.thfilter(c)
return c:IsSetCard(0x114) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x114) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c64400161.target(e,tp,eg,ep,ev,re,r,rp,chk) function c64400161.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c64400161.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.IsExistingMatchingCard(c64400161.thfilter,tp,LOCATION_DECK,0,1,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
function c64400161.operation(e,tp,eg,ep,ev,re,r,rp) function c64400161.operation(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if not aux.IsPlayerCanNormalDraw(tp) then return end
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) then return end aux.GiveUpNormalDraw(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c64400161.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c64400161.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
--古代の機械暗黒巨人 --古代の機械暗黒巨人
function c101204006.initial_effect(c) function c64603182.initial_effect(c)
aux.AddCodeList(c,83104731) aux.AddCodeList(c,83104731)
aux.EnableChangeCode(c,83104731,LOCATION_MZONE+LOCATION_GRAVE) aux.EnableChangeCode(c,83104731,LOCATION_MZONE+LOCATION_GRAVE)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204006,0)) e1:SetDescription(aux.Stringid(64603182,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_HANDES) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101204006) e1:SetCountLimit(1,64603182)
e1:SetTarget(c101204006.thtg) e1:SetTarget(c64603182.thtg)
e1:SetOperation(c101204006.thop) e1:SetOperation(c64603182.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
...@@ -21,20 +21,20 @@ function c101204006.initial_effect(c) ...@@ -21,20 +21,20 @@ function c101204006.initial_effect(c)
e3:SetCode(EFFECT_CANNOT_ACTIVATE) e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
e3:SetValue(c101204006.aclimit) e3:SetValue(c64603182.aclimit)
e3:SetCondition(c101204006.actcon) e3:SetCondition(c64603182.actcon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101204006.thfilter(c) function c64603182.thfilter(c)
return not c:IsCode(101204006) and (c:IsSetCard(0x7) or c:IsCode(37694547)) and c:IsAbleToHand() return not c:IsCode(64603182) and (c:IsSetCard(0x7) or c:IsCode(37694547)) and c:IsAbleToHand()
end end
function c101204006.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c64603182.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101204006.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c64603182.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c101204006.thop(e,tp,eg,ep,ev,re,r,rp) function c64603182.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101204006.thfilter,tp,LOCATION_DECK,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,c64603182.thfilter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
...@@ -58,15 +58,15 @@ function c101204006.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,15 +58,15 @@ function c101204006.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
local e4=e1:Clone() local e4=e1:Clone()
e4:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION) e4:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e4:SetTarget(c101204006.sumlimit) e4:SetTarget(c64603182.sumlimit)
Duel.RegisterEffect(e4,tp) Duel.RegisterEffect(e4,tp)
end end
function c101204006.sumlimit(e,c,sump,sumtype,sumpos,targetp) function c64603182.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0 return bit.band(sumpos,POS_FACEDOWN)>0
end end
function c101204006.aclimit(e,re,tp) function c64603182.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c101204006.actcon(e) function c64603182.actcon(e)
return Duel.GetAttacker()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler()
end end
\ No newline at end of file
--幻奏の歌姫ルフラン --幻奏の歌姫ルフラン
function c101204009.initial_effect(c) function c64881644.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(101204009,0)) e0:SetDescription(aux.Stringid(64881644,0))
e0:SetCategory(CATEGORY_ATKCHANGE) e0:SetCategory(CATEGORY_ATKCHANGE)
e0:SetType(EFFECT_TYPE_IGNITION) e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE) e0:SetRange(LOCATION_PZONE)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET) e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
e0:SetCountLimit(1,101204009) e0:SetCountLimit(1,64881644)
e0:SetTarget(c101204009.atktg) e0:SetTarget(c64881644.atktg)
e0:SetOperation(c101204009.atkop) e0:SetOperation(c64881644.atkop)
c:RegisterEffect(e0) c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204009,1)) e1:SetDescription(aux.Stringid(64881644,1))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101204109) e1:SetCountLimit(1,64881645)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c101204009.thtg) e1:SetTarget(c64881644.thtg)
e1:SetOperation(c101204009.thop) e1:SetOperation(c64881644.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101204009,2)) e3:SetDescription(aux.Stringid(64881644,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_EXTRA) e3:SetRange(LOCATION_EXTRA)
e3:SetCountLimit(1,101204209) e3:SetCountLimit(1,64881646)
e3:SetCondition(c101204009.pencon) e3:SetCondition(c64881644.pencon)
e3:SetTarget(c101204009.pentg) e3:SetTarget(c64881644.pentg)
e3:SetOperation(c101204009.penop) e3:SetOperation(c64881644.penop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101204009.tgfilter(c) function c64881644.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x9b) and c:IsAbleToGrave() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x9b) and c:IsAbleToGrave()
end end
function c101204009.filter(c) function c64881644.filter(c)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9b) and c:IsFaceup() return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9b) and c:IsFaceup()
end end
function c101204009.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c64881644.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101204009.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c64881644.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101204009.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c101204009.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c64881644.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c64881644.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c101204009.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c64881644.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function c101204009.atkop(e,tp,eg,ep,ev,re,r,rp) function c64881644.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c101204009.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() local tg=Duel.SelectMatchingCard(tp,c64881644.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tg and Duel.SendtoGrave(tg,REASON_COST)~=0 and tg:IsLocation(LOCATION_GRAVE) then if tg and Duel.SendtoGrave(tg,REASON_COST)~=0 and tg:IsLocation(LOCATION_GRAVE) then
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
...@@ -66,31 +66,31 @@ function c101204009.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,31 +66,31 @@ function c101204009.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c101204009.thfilter(c) function c64881644.thfilter(c)
return not c:IsCode(101204009) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x9b) and c:IsAbleToHand() return not c:IsCode(64881644) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x9b) and c:IsAbleToHand()
end end
function c101204009.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c64881644.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101204009.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c64881644.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c101204009.thop(e,tp,eg,ep,ev,re,r,rp) function c64881644.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101204009.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c64881644.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c101204009.cfilter(c,tp) function c64881644.cfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsSetCard(0x9b) and c:IsControler(tp) return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsSetCard(0x9b) and c:IsControler(tp)
end end
function c101204009.pencon(e,tp,eg,ep,ev,re,r,rp) function c64881644.pencon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and eg:IsExists(c101204009.cfilter,1,nil,tp) return e:GetHandler():IsFaceup() and eg:IsExists(c64881644.cfilter,1,nil,tp)
end end
function c101204009.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c64881644.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end end
function c101204009.penop(e,tp,eg,ep,ev,re,r,rp) function c64881644.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then if c:IsRelateToEffect(e) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
......
--天盃龍ファドラ --天盃龍ファドラ
function c101204017.initial_effect(c) function c65326118.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204017,0)) e1:SetDescription(aux.Stringid(65326118,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101204017) e1:SetCountLimit(1,65326118)
e1:SetTarget(c101204017.sptg) e1:SetTarget(c65326118.sptg)
e1:SetOperation(c101204017.spop) e1:SetOperation(c65326118.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
...@@ -23,59 +23,59 @@ function c101204017.initial_effect(c) ...@@ -23,59 +23,59 @@ function c101204017.initial_effect(c)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0) e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c101204017.indtg) e4:SetTarget(c65326118.indtg)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101204017,2)) e5:SetDescription(aux.Stringid(65326118,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN) e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END+TIMING_BATTLE_END) e5:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END+TIMING_BATTLE_END)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1) e5:SetCountLimit(1)
e5:SetCondition(c101204017.sccon) e5:SetCondition(c65326118.sccon)
e5:SetTarget(c101204017.sctg) e5:SetTarget(c65326118.sctg)
e5:SetOperation(c101204017.scop) e5:SetOperation(c65326118.scop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c101204017.filter(c,e,tp) function c65326118.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(4) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(4)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101204017.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c65326118.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101204017.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c65326118.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101204017.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c65326118.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101204017.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c65326118.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c101204017.spop(e,tp,eg,ep,ev,re,r,rp) function c65326118.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c101204017.indtg(e,c) function c65326118.indtg(e,c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE)
end end
function c101204017.sccon(e,tp,eg,ep,ev,re,r,rp) function c65326118.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c101204017.mfilter(c) function c65326118.mfilter(c)
return not c:IsStatus(STATUS_SUMMONING) return not c:IsStatus(STATUS_SUMMONING)
end end
function c101204017.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function c65326118.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(c101204017.mfilter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(c65326118.mfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),mg) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),mg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c101204017.scop(e,tp,eg,ep,ev,re,r,rp) function c65326118.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(c101204017.mfilter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(c65326118.mfilter,tp,LOCATION_MZONE,0,nil)
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c,mg) local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
......
--サイレント・マジシャン・ゼロ --サイレント・マジシャン・ゼロ
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204051) aux.AddCodeList(c,79791878)
--level up --level up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
...@@ -55,7 +55,7 @@ function s.value(e,c) ...@@ -55,7 +55,7 @@ function s.value(e,c)
return math.max(0,c:GetLevel()-c:GetOriginalLevel())*500 return math.max(0,c:GetLevel()-c:GetOriginalLevel())*500
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() and c:IsCode(101204051) return c:IsFaceup() and c:IsCode(79791878)
end end
function s.negcon(e,tp,eg,ep,ev,re,r,rp) function s.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -26,7 +26,7 @@ function c66150724.initial_effect(c) ...@@ -26,7 +26,7 @@ function c66150724.initial_effect(c)
c66150724.global_check=true c66150724.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS) ge1:SetCode(EVENT_SPSUMMON_SUCCESS_G_P)
ge1:SetOperation(c66150724.checkop) ge1:SetOperation(c66150724.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
......
...@@ -32,8 +32,10 @@ function s.initial_effect(c) ...@@ -32,8 +32,10 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.cfilter(c,tp,se) function s.cfilter(c,tp,se)
return c:IsPreviousControler(tp) and not c:IsPreviousLocation(LOCATION_SZONE) and c:GetOriginalAttribute()==ATTRIBUTE_FIRE return c:IsPreviousControler(tp) and not c:IsPreviousLocation(LOCATION_SZONE)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and (se==nil or c:GetReasonEffect()~=se) and (c:IsPreviousLocation(LOCATION_MZONE) or c:GetOriginalType()&TYPE_MONSTER~=0)
and c:GetOriginalAttribute()==ATTRIBUTE_FIRE and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and (se==nil or c:GetReasonEffect()~=se)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -12,31 +12,17 @@ function c66499018.initial_effect(c) ...@@ -12,31 +12,17 @@ function c66499018.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c66499018.condition(e,tp,eg,ep,ev,re,r,rp) function c66499018.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetDrawCount(tp)>0
end end
function c66499018.target(e,tp,eg,ep,ev,re,r,rp,chk) function c66499018.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
local dt=Duel.GetDrawCount(tp) aux.GiveUpNormalDraw(e,tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c66499018.operation(e,tp,eg,ep,ev,re,r,rp) function c66499018.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if aux.DrawReplaceCount<=aux.DrawReplaceMax and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
--燦幻開門 --燦幻開門
function c101204060.initial_effect(c) function c66730191.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101204060+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,66730191+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101204060.target) e1:SetTarget(c66730191.target)
e1:SetOperation(c101204060.activate) e1:SetOperation(c66730191.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c101204060.filter(c) function c66730191.filter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(4) and c:IsAbleToHand() return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(4) and c:IsAbleToHand()
end end
function c101204060.spfilter(c,e,tp) function c66730191.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101204060.target(e,tp,eg,ep,ev,re,r,rp,chk) function c66730191.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101204060.filter,tp,LOCATION_DECK,0,1,nil) or Duel.IsExistingMatchingCard(c101204060.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c66730191.filter,tp,LOCATION_DECK,0,1,nil) or Duel.IsExistingMatchingCard(c66730191.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c101204060.activate(e,tp,eg,ep,ev,re,r,rp) function c66730191.activate(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
local op=0 local op=0
if Duel.IsExistingMatchingCard(c101204060.filter,tp,LOCATION_DECK,0,1,nil) then if Duel.IsExistingMatchingCard(c66730191.filter,tp,LOCATION_DECK,0,1,nil) then
if not Duel.IsExistingMatchingCard(c101204060.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 and Duel.IsExistingMatchingCard(c101204060.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(101204060,1)) then if not Duel.IsExistingMatchingCard(c66730191.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 and Duel.IsExistingMatchingCard(c66730191.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(66730191,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101204060.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c66730191.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
...@@ -36,12 +36,12 @@ function c101204060.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,12 +36,12 @@ function c101204060.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
Duel.AdjustAll() Duel.AdjustAll()
if op==0 or Duel.IsExistingMatchingCard(c101204060.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.SelectYesNo(tp,aux.Stringid(101204060,2)) then if op==0 or Duel.IsExistingMatchingCard(c66730191.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.SelectYesNo(tp,aux.Stringid(66730191,2)) then
if op~=0 then if op~=0 then
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101204060.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,e,tp) local g=Duel.SelectMatchingCard(tp,c66730191.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -20,7 +20,6 @@ function c67906797.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,7 +20,6 @@ function c67906797.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetMinGroup(Card.GetSequence):GetFirst() local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
if Duel.SendtoHand(tc,tp,REASON_EFFECT)>0 then if Duel.SendtoHand(tc,tp,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=1 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=1 then return end
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -79,6 +79,7 @@ function c6992184.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,6 +79,7 @@ function c6992184.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local pop=aux.PendOperation() local pop=aux.PendOperation()
pop(e,tp,eg,ep,ev,re,r,rp,lpz,sg,g) pop(e,tp,eg,ep,ev,re,r,rp,lpz,sg,g)
Duel.RaiseEvent(sg,EVENT_SPSUMMON_SUCCESS_G_P,e,REASON_EFFECT,tp,tp,0)
Duel.SpecialSummon(sg,SUMMON_TYPE_PENDULUM,tp,tp,true,true,POS_FACEUP) Duel.SpecialSummon(sg,SUMMON_TYPE_PENDULUM,tp,tp,true,true,POS_FACEUP)
end end
function c6992184.retop(e,tp,eg,ep,ev,re,r,rp) function c6992184.retop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -57,8 +57,7 @@ function s.initial_effect(c) ...@@ -57,8 +57,7 @@ function s.initial_effect(c)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return Duel.GetTurnPlayer()==tp
and Duel.GetDrawCount(tp)>0
end end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end if chk==0 then return not e:GetHandler():IsPublic() end
...@@ -67,31 +66,25 @@ function s.thfilter(c) ...@@ -67,31 +66,25 @@ function s.thfilter(c)
return bit.band(c:GetType(),0x82)==0x82 and c:IsAbleToHand() return bit.band(c:GetType(),0x82)==0x82 and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if not aux.IsPlayerCanNormalDraw(tp) then return end
if aux.DrawReplaceCount<=aux.DrawReplaceMax then aux.GiveUpNormalDraw(e,tp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT) e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW) e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0) e1:SetValue(0)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end
end end
end end
function s.actcon(e) function s.actcon(e)
......
...@@ -30,7 +30,6 @@ function c70583986.thfilter(c,tp) ...@@ -30,7 +30,6 @@ function c70583986.thfilter(c,tp)
end end
function c70583986.operation(e,tp,eg,ep,ev,re,r,rp) function c70583986.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=Duel.GetTargetsRelateToChain() local tg=Duel.GetTargetsRelateToChain()
local rg=tg:Filter(c70583986.thfilter,nil,tp) local rg=tg:Filter(c70583986.thfilter,nil,tp)
Duel.SendtoHand(rg,nil,REASON_EFFECT) Duel.SendtoHand(rg,nil,REASON_EFFECT)
......
...@@ -60,32 +60,19 @@ function c70676581.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,32 +60,19 @@ function c70676581.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c70676581.condition(e,tp,eg,ep,ev,re,r,rp) function c70676581.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c70676581.filter(c) function c70676581.filter(c)
return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
end end
function c70676581.target(e,tp,eg,ep,ev,re,r,rp,chk) function c70676581.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c70676581.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.IsExistingMatchingCard(c70676581.filter,tp,LOCATION_DECK,0,1,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
function c70676581.operation(e,tp,eg,ep,ev,re,r,rp) function c70676581.operation(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if not aux.IsPlayerCanNormalDraw(tp) then return end
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end aux.GiveUpNormalDraw(e,tp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c70676581.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c70676581.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()~=0 then if g:GetCount()~=0 then
......
...@@ -55,7 +55,7 @@ end ...@@ -55,7 +55,7 @@ end
function c72819261.atttg(e,tp,eg,ep,ev,re,r,rp,chk) function c72819261.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute()) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~e:GetHandler():GetAttribute())
e:SetLabel(att) e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end end
......
...@@ -73,7 +73,7 @@ function c74567889.seqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function c74567889.seqop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveSequence(c,nseq) Duel.MoveSequence(c,nseq)
if c:GetSequence()==nseq and Duel.SelectEffectYesNo(tp,c,aux.Stringid(74567889,2)) then if c:GetSequence()==nseq and Duel.SelectEffectYesNo(tp,c,aux.Stringid(74567889,2)) then
Duel.BreakEffect() Duel.BreakEffect()
local attr=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-c:GetAttribute()) local attr=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~c:GetAttribute())
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
......
...@@ -4,7 +4,7 @@ function s.initial_effect(c) ...@@ -4,7 +4,7 @@ function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
......
--未来への沈黙 --未来への沈黙
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204051) aux.AddCodeList(c,79791878)
--Activate without draw --Activate without draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
...@@ -21,10 +21,10 @@ function s.initial_effect(c) ...@@ -21,10 +21,10 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.sfilter(c) function s.sfilter(c)
return c:IsFaceup() and c:IsCode(101204051) return c:IsFaceup() and c:IsCode(79791878)
end end
function s.mfilter(c) function s.mfilter(c)
return c:IsFaceup() and aux.IsCodeListed(c,101204051) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and aux.IsCodeListed(c,79791878) and c:IsType(TYPE_MONSTER)
end end
function s.ndcon(e,tp,eg,ep,ev,re,r,rp) function s.ndcon(e,tp,eg,ep,ev,re,r,rp)
return not s.dcon(e,tp,eg,ep,ev,re,r,rp) return not s.dcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -34,7 +34,7 @@ function s.dcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function s.dcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.mfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.mfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function s.filter(c) function s.filter(c)
return aux.IsCodeListed(c,101204051) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return aux.IsCodeListed(c,79791878) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function s.ndtarget(e,tp,eg,ep,ev,re,r,rp,chk) function s.ndtarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
......
--光の黄金櫃 --光の黄金櫃
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204051) aux.AddCodeList(c,79791878)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
......
...@@ -19,7 +19,7 @@ end ...@@ -19,7 +19,7 @@ end
function c7986397.rcheck(tp,g,c) function c7986397.rcheck(tp,g,c)
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end end
function c7986397.rgcheck(g) function c7986397.rgcheck(g,ec)
return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 return g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end end
function c7986397.target(e,tp,eg,ep,ev,re,r,rp,chk) function c7986397.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -57,10 +57,10 @@ function s.costfilter(c,e,tp) ...@@ -57,10 +57,10 @@ function s.costfilter(c,e,tp)
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,c) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,c)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.CheckReleaseGroup(REASON_COST,tp,s.costfilter,1,nil,e,tp) end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,e,tp) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,s.costfilter,1,1,nil,e,tp) local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
......
...@@ -6,15 +6,14 @@ function c82434071.initial_effect(c) ...@@ -6,15 +6,14 @@ function c82434071.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCode(EVENT_PREDRAW) e1:SetCode(EVENT_PREDRAW)
e1:SetCost(aux.bfgcost)
e1:SetCondition(c82434071.opcon) e1:SetCondition(c82434071.opcon)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c82434071.optg) e1:SetTarget(c82434071.optg)
e1:SetOperation(c82434071.opop) e1:SetOperation(c82434071.opop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c82434071.opcon(e,tp,eg,ep,ev,re,r,rp) function c82434071.opcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
and Duel.GetDrawCount(tp)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
end end
function c82434071.ttopfilter(c) function c82434071.ttopfilter(c)
return c:IsSetCard(0xb) return c:IsSetCard(0xb)
...@@ -25,20 +24,8 @@ end ...@@ -25,20 +24,8 @@ end
function c82434071.optg(e,tp,eg,ep,ev,re,r,rp,chk) function c82434071.optg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c82434071.ttopfilter,tp,LOCATION_DECK,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 local b1=Duel.IsExistingMatchingCard(c82434071.ttopfilter,tp,LOCATION_DECK,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1
local b2=Duel.IsExistingMatchingCard(c82434071.ssetfilter,tp,LOCATION_DECK,0,1,nil) local b2=Duel.IsExistingMatchingCard(c82434071.ssetfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and (b1 or b2) end
local dt=Duel.GetDrawCount(tp) aux.GiveUpNormalDraw(e,tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
local off=1 local off=1
local ops,opval={},{} local ops,opval={},{}
if b1 then if b1 then
...@@ -57,8 +44,6 @@ function c82434071.optg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -57,8 +44,6 @@ function c82434071.optg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c82434071.opop(e,tp,eg,ep,ev,re,r,rp) function c82434071.opop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount>aux.DrawReplaceMax then return end
local sel=e:GetLabel() local sel=e:GetLabel()
if sel==0 then if sel==0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(82434071,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(82434071,3))
......
--燦幻昇龍バイデント·ドラギオン --燦幻昇龍バイデント·ドラギオン
function c101204039.initial_effect(c) function c82570174.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_DRAGON),1) aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_DRAGON),1)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204039,0)) e1:SetDescription(aux.Stringid(82570174,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101204039) e1:SetCountLimit(1,82570174)
e1:SetCondition(c101204039.spcon) e1:SetCondition(c82570174.spcon)
e1:SetTarget(c101204039.sptg) e1:SetTarget(c82570174.sptg)
e1:SetOperation(c101204039.spop) e1:SetOperation(c82570174.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101204039,1)) e2:SetDescription(aux.Stringid(82570174,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_ATTACK+TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_ATTACK+TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101204139+EFFECT_COUNT_CODE_DUEL) e2:SetCountLimit(1,82570175+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c101204039.spcon2) e2:SetCondition(c82570174.spcon2)
e2:SetCost(c101204039.spcost2) e2:SetCost(c82570174.spcost2)
e2:SetTarget(c101204039.sptg2) e2:SetTarget(c82570174.sptg2)
e2:SetOperation(c101204039.spop2) e2:SetOperation(c82570174.spop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not c101204039.global_check then if not c82570174.global_check then
c101204039.global_check=true c82570174.global_check=true
local ge1=Effect.GlobalEffect() local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE) ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetOperation(c101204039.checkop) ge1:SetOperation(c82570174.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function c101204039.checkop(e,tp,eg,ep,ev,re,r,rp) function c82570174.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,101204039,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,82570174,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1-tp,101204039,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(1-tp,82570174,RESET_PHASE+PHASE_END,0,1)
end end
function c101204039.spcon(e,tp,eg,ep,ev,re,r,rp) function c82570174.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c101204039.spfilter(c,e,tp) function c82570174.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101204039.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c82570174.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101204039.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c82570174.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101204039.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c82570174.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101204039.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c82570174.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c101204039.spop(e,tp,eg,ep,ev,re,r,rp) function c82570174.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
...@@ -69,26 +69,26 @@ function c101204039.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,26 +69,26 @@ function c101204039.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c101204039.spcon2(e,tp,eg,ep,ev,re,r,rp) function c82570174.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,101204039)>=3 return Duel.GetFlagEffect(tp,82570174)>=3
end end
function c101204039.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) function c82570174.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return true end if chk==0 then return true end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204039,3)) e1:SetDescription(aux.Stringid(82570174,3))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c101204039.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c82570174.sptg2(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 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) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c101204039.spop2(e,tp,eg,ep,ev,re,r,rp) function c82570174.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) and Duel.SelectYesNo(tp,aux.Stringid(101204039,2)) then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) and Duel.SelectYesNo(tp,aux.Stringid(82570174,2)) then
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if #g>0 then if #g>0 then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -58,7 +58,7 @@ end ...@@ -58,7 +58,7 @@ end
function c83032858.atttg(e,tp,eg,ep,ev,re,r,rp,chk) function c83032858.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute()) local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~e:GetHandler():GetAttribute())
e:SetLabel(att) e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end end
......
...@@ -48,8 +48,8 @@ function s.spfilter(c,e,tp,lv) ...@@ -48,8 +48,8 @@ function s.spfilter(c,e,tp,lv)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,s.costfilter,1,nil,e,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,e,tp) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,s.costfilter,1,1,nil,e,tp) local sg=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,e,tp)
e:SetLabel(sg:GetFirst():GetLevel()) e:SetLabel(sg:GetFirst():GetLevel())
Duel.Release(sg,REASON_COST) Duel.Release(sg,REASON_COST)
end end
......
...@@ -19,7 +19,7 @@ function c8491308.initial_effect(c) ...@@ -19,7 +19,7 @@ function c8491308.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c8491308.matfilter(c) function c8491308.matfilter(c)
return c:IsLinkSetCard(0x1115) and c:IsLinkAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WIND) return c:IsLinkSetCard(0x1115) and c:IsLinkAttribute(ATTRIBUTE_ALL&~ATTRIBUTE_WIND)
end end
function c8491308.tgfilter(c) function c8491308.tgfilter(c)
return c:IsSetCard(0x115) and c:IsAbleToGrave() return c:IsSetCard(0x115) and c:IsAbleToGrave()
......
...@@ -96,51 +96,18 @@ function c88851326.attg(e,c) ...@@ -96,51 +96,18 @@ function c88851326.attg(e,c)
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonLocation(LOCATION_EXTRA) return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonLocation(LOCATION_EXTRA)
end end
function c88851326.thcon(e,tp,eg,ep,ev,re,r,rp) function c88851326.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c88851326.thfilter(c) function c88851326.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c88851326.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c88851326.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88851326.thfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.IsExistingMatchingCard(c88851326.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetLabel(cid)
e2:SetLabelObject(e1)
e2:SetReset(RESET_PHASE+PHASE_DRAW)
e2:SetCondition(c88851326.checkcon1)
e2:SetOperation(c88851326.checkop1)
Duel.RegisterEffect(e2,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end end
function c88851326.checkcon1(e,tp,eg,ep,ev,re,r,rp)
local cid,orig_effect=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID,CHAININFO_TRIGGERING_EFFECT)
return cid==e:GetLabel() and not e:GetOwner():IsRelateToEffect(orig_effect)
end
function c88851326.checkop1(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():Reset()
e:Reset()
end
function c88851326.thop(e,tp,eg,ep,ev,re,r,rp) function c88851326.thop(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if not aux.IsPlayerCanNormalDraw(tp) then return end
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) then return end aux.GiveUpNormalDraw(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88851326.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c88851326.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
--幻奏の歌姫クープレ --幻奏の歌姫クープレ
function c101204010.initial_effect(c) function c90276649.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD) e0:SetType(EFFECT_TYPE_FIELD)
...@@ -7,98 +7,98 @@ function c101204010.initial_effect(c) ...@@ -7,98 +7,98 @@ function c101204010.initial_effect(c)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetTargetRange(1,0) e0:SetTargetRange(1,0)
e0:SetTarget(c101204010.splimit) e0:SetTarget(c90276649.splimit)
c:RegisterEffect(e0) c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204010,0)) e1:SetDescription(aux.Stringid(90276649,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,101204010) e1:SetCountLimit(1,90276649)
e1:SetCondition(c101204010.thcon) e1:SetCondition(c90276649.thcon)
e1:SetTarget(c101204010.thtg) e1:SetTarget(c90276649.thtg)
e1:SetOperation(c101204010.thop) e1:SetOperation(c90276649.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101204010,1)) e2:SetDescription(aux.Stringid(90276649,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_HAND) e2:SetCode(EVENT_TO_HAND)
e2:SetCountLimit(1,101204110) e2:SetCountLimit(1,90276650)
e2:SetCondition(c101204010.spcon) e2:SetCondition(c90276649.spcon)
e2:SetCost(c101204010.spcost) e2:SetCost(c90276649.spcost)
e2:SetTarget(c101204010.sptg) e2:SetTarget(c90276649.sptg)
e2:SetOperation(c101204010.spop) e2:SetOperation(c90276649.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101204010,2)) e3:SetDescription(aux.Stringid(90276649,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_EXTRA) e3:SetRange(LOCATION_EXTRA)
e3:SetCountLimit(1,101204210) e3:SetCountLimit(1,90276651)
e3:SetCondition(c101204010.pencon) e3:SetCondition(c90276649.pencon)
e3:SetTarget(c101204010.pentg) e3:SetTarget(c90276649.pentg)
e3:SetOperation(c101204010.penop) e3:SetOperation(c90276649.penop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101204010.splimit(e,c,tp,sumtp,sumpos) function c90276649.splimit(e,c,tp,sumtp,sumpos)
return not c:IsAttribute(ATTRIBUTE_LIGHT) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM return not c:IsAttribute(ATTRIBUTE_LIGHT) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end end
function c101204010.thcfilter(c) function c90276649.thcfilter(c)
return c:IsFaceup() and not c:IsSetCard(0x9b) return c:IsFaceup() and not c:IsSetCard(0x9b)
end end
function c101204010.thcon(e,tp,eg,ep,ev,re,r,rp) function c90276649.thcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101204010.thcfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(c90276649.thcfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c101204010.thfilter(c) function c90276649.thfilter(c)
return c:IsSetCard(0x9b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x9b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function c101204010.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c90276649.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101204010.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c90276649.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c101204010.thop(e,tp,eg,ep,ev,re,r,rp) function c90276649.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101204010.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c90276649.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c101204010.spcon(e,tp,eg,ep,ev,re,r,rp) function c90276649.spcon(e,tp,eg,ep,ev,re,r,rp)
return not (r==REASON_RULE) return not (r==REASON_RULE)
end end
function c101204010.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c90276649.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end if chk==0 then return not e:GetHandler():IsPublic() end
end end
function c101204010.spfilter(c,e,tp) function c90276649.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x9b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsSetCard(0x9b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101204010.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c90276649.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101204010.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c90276649.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end end
function c101204010.spop(e,tp,eg,ep,ev,re,r,rp) function c90276649.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101204010.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c90276649.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c101204010.cfilter(c,tp) function c90276649.cfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsSetCard(0x9b) and c:IsControler(tp) return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsSetCard(0x9b) and c:IsControler(tp)
end end
function c101204010.pencon(e,tp,eg,ep,ev,re,r,rp) function c90276649.pencon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and eg:IsExists(c101204010.cfilter,1,nil,tp) return e:GetHandler():IsFaceup() and eg:IsExists(c90276649.cfilter,1,nil,tp)
end end
function c101204010.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c90276649.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end end
function c101204010.penop(e,tp,eg,ep,ev,re,r,rp) function c90276649.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then if c:IsRelateToEffect(e) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
......
--タイム・ディメンションホール
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummon(tp) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1
and Duel.IsExistingMatchingCard(Card.IsSummonableCard,tp,LOCATION_DECK,0,1,nil) end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1 then return false end
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
Duel.DisableShuffleCheck()
if tc:IsSummonableCard() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
if Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))==1 then
Duel.MoveSequence(tc,1)
end
end
end
\ No newline at end of file
...@@ -35,7 +35,7 @@ function c90673288.initial_effect(c) ...@@ -35,7 +35,7 @@ function c90673288.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c90673288.matfilter(c) function c90673288.matfilter(c)
return c:IsLinkSetCard(0x1115) and c:IsLinkAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WATER) return c:IsLinkSetCard(0x1115) and c:IsLinkAttribute(ATTRIBUTE_ALL&~ATTRIBUTE_WATER)
end end
function c90673288.atkval(e) function c90673288.atkval(e)
return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_SPELL)*-100 return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_SPELL)*-100
......
...@@ -49,8 +49,9 @@ function s.initial_effect(c) ...@@ -49,8 +49,9 @@ function s.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c:IsPreviousControler(tp) and not c:IsPreviousLocation(LOCATION_SZONE) and c:GetOriginalAttribute()==ATTRIBUTE_FIRE return c:IsPreviousControler(tp) and not c:IsPreviousLocation(LOCATION_SZONE)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and (c:IsPreviousLocation(LOCATION_MZONE) or c:GetOriginalType()&TYPE_MONSTER~=0)
and c:GetOriginalAttribute()==ATTRIBUTE_FIRE and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp) return eg:IsExists(s.cfilter,1,nil,tp)
......
--古代の機械戦車兵 --古代の機械戦車兵
function c101204007.initial_effect(c) function c91098230.initial_effect(c)
aux.AddCodeList(c,83104731) aux.AddCodeList(c,83104731)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204007,0)) e1:SetDescription(aux.Stringid(91098230,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101204007) e1:SetCountLimit(1,91098230)
e1:SetTarget(c101204007.sptg) e1:SetTarget(c91098230.sptg)
e1:SetOperation(c101204007.spop) e1:SetOperation(c91098230.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101204007,1)) e3:SetDescription(aux.Stringid(91098230,1))
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,101204107) e3:SetCountLimit(1,91098231)
e3:SetTarget(c101204007.destg) e3:SetTarget(c91098230.destg)
e3:SetOperation(c101204007.desop) e3:SetOperation(c91098230.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101204007.filter1(c,e,tp) function c91098230.filter1(c,e,tp)
return not c:IsCode(101204007) and c:IsSetCard(0x7) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return not c:IsCode(91098230) and c:IsSetCard(0x7) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_GRAVE) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil)) and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_GRAVE) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil))
end end
function c101204007.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c91098230.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101204007.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c91098230.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c101204007.spop(e,tp,eg,ep,ev,re,r,rp) function c91098230.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101204007.filter1),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c91098230.filter1),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end end
end end
function c101204007.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c91098230.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c101204007.desop(e,tp,eg,ep,ev,re,r,rp) function c91098230.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
...@@ -58,11 +58,11 @@ function c101204007.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,11 +58,11 @@ function c101204007.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c101204007.atktg) e1:SetTarget(c91098230.atktg)
e1:SetValue(600) e1:SetValue(600)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c101204007.atktg(e,c) function c91098230.atktg(e,c)
return c:IsCode(83104731) or aux.IsCodeListed(c,83104731) return c:IsCode(83104731) or aux.IsCodeListed(c,83104731)
end end
\ No newline at end of file
--ビッグ・インフレート・ドラゴン
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,50)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==50 end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.nzatk(c) end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(10000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
\ No newline at end of file
--天盃龍チュンドラ --天盃龍チュンドラ
function c101204018.initial_effect(c) function c91810826.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204018,0)) e1:SetDescription(aux.Stringid(91810826,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101204018) e1:SetCountLimit(1,91810826)
e1:SetCondition(c101204018.spcon) e1:SetCondition(c91810826.spcon)
e1:SetTarget(c101204018.sptg) e1:SetTarget(c91810826.sptg)
e1:SetOperation(c101204018.spop) e1:SetOperation(c91810826.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101204018,1)) e2:SetDescription(aux.Stringid(91810826,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BATTLE_START) e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101204118) e2:SetCountLimit(1,91810827)
e2:SetTarget(c101204018.sptg2) e2:SetTarget(c91810826.sptg2)
e2:SetOperation(c101204018.spop2) e2:SetOperation(c91810826.spop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101204018,2)) e3:SetDescription(aux.Stringid(91810826,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END+TIMING_BATTLE_END) e3:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END+TIMING_BATTLE_END)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(c101204018.sccon) e3:SetCondition(c91810826.sccon)
e3:SetTarget(c101204018.sctg) e3:SetTarget(c91810826.sctg)
e3:SetOperation(c101204018.scop) e3:SetOperation(c91810826.scop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101204018.cfilter(c) function c91810826.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE)
end end
function c101204018.spcon(e,tp,eg,ep,ev,re,r,rp) function c91810826.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101204018.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c91810826.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c101204018.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c91810826.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c101204018.spop(e,tp,eg,ep,ev,re,r,rp) function c91810826.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c101204018.filter(c,e,tp) function c91810826.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(4) and not c:IsCode(101204018) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(4) and not c:IsCode(91810826)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101204018.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c91810826.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101204018.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c91810826.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c101204018.spop2(e,tp,eg,ep,ev,re,r,rp) function c91810826.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101204018.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c91810826.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c101204018.sccon(e,tp,eg,ep,ev,re,r,rp) function c91810826.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c101204018.mfilter(c) function c91810826.mfilter(c)
return not c:IsStatus(STATUS_SUMMONING) return not c:IsStatus(STATUS_SUMMONING)
end end
function c101204018.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function c91810826.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(c101204018.mfilter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(c91810826.mfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),mg) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),mg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c101204018.scop(e,tp,eg,ep,ev,re,r,rp) function c91810826.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local mg=Duel.GetMatchingGroup(c101204018.mfilter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(c91810826.mfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c,mg) local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -35,30 +35,17 @@ function c91819979.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,30 +35,17 @@ function c91819979.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(p,ct*200,REASON_EFFECT) Duel.Damage(p,ct*200,REASON_EFFECT)
end end
function c91819979.thcon(e,tp,eg,ep,ev,re,r,rp) function c91819979.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c91819979.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c91819979.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and e:GetHandler():IsAbleToHand() end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c91819979.thop(e,tp,eg,ep,ev,re,r,rp) function c91819979.thop(e,tp,eg,ep,ev,re,r,rp)
if not aux.IsPlayerCanNormalDraw(tp) then return end
aux.GiveUpNormalDraw(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if c:IsRelateToEffect(e) then
if aux.DrawReplaceCount<=aux.DrawReplaceMax and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
end end
......
--トリコロール・ガジェット --トリコロール・ガジェット
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101204051) aux.AddCodeList(c,79791878)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
...@@ -29,7 +29,7 @@ function s.initial_effect(c) ...@@ -29,7 +29,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.srfilter(c) function s.srfilter(c)
return (c:IsCode(101204051) or aux.IsCodeListed(c,101204051) and c:IsType(TYPE_SPELL+TYPE_TRAP)) and c:IsAbleToHand() return (c:IsCode(79791878) or aux.IsCodeListed(c,79791878) and c:IsType(TYPE_SPELL+TYPE_TRAP)) and c:IsAbleToHand()
end end
function s.srtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.srfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.srfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -47,7 +47,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end end
function s.setfilter(c) function s.setfilter(c)
return c:IsCode(101204071) and c:IsSSetable() return c:IsCode(27157727) and c:IsSSetable()
end end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -29,7 +29,7 @@ function c94331452.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -29,7 +29,7 @@ function c94331452.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local rc=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute()) local rc=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~g:GetFirst():GetAttribute())
e:SetLabel(rc) e:SetLabel(rc)
end end
function c94331452.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c94331452.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -38,7 +38,7 @@ function c94331452.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -38,7 +38,7 @@ function c94331452.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local rc=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute()) local rc=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~g:GetFirst():GetAttribute())
e:SetLabel(rc) e:SetLabel(rc)
end end
function c94331452.operation(e,tp,eg,ep,ev,re,r,rp) function c94331452.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -55,7 +55,7 @@ end ...@@ -55,7 +55,7 @@ end
function c9505425.atttg(e,tp,eg,ep,ev,re,r,rp,chk) function c9505425.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute()) local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL&~e:GetHandler():GetAttribute())
e:SetLabel(aat) e:SetLabel(aat)
end end
function c9505425.attop(e,tp,eg,ep,ev,re,r,rp) function c9505425.attop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -49,7 +49,8 @@ function c95856586.chainlm(e,rp,tp) ...@@ -49,7 +49,8 @@ function c95856586.chainlm(e,rp,tp)
return tp==rp return tp==rp
end end
function c95856586.tgfilter(c,e,tp) function c95856586.tgfilter(c,e,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsType(TYPE_XYZ) and c:IsCanBeEffectTarget(e) return c:IsFaceup() and c:IsControler(tp) and c:IsType(TYPE_XYZ)
and c:IsLocation(LOCATION_MZONE) and c:IsCanBeEffectTarget(e)
end end
function c95856586.matfilter(c) function c95856586.matfilter(c)
return c:IsType(TYPE_XYZ) and c:IsCanOverlay() return c:IsType(TYPE_XYZ) and c:IsCanOverlay()
......
...@@ -12,32 +12,19 @@ function c97697678.initial_effect(c) ...@@ -12,32 +12,19 @@ function c97697678.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c97697678.condition(e,tp,eg,ep,ev,re,r,rp) function c97697678.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 return tp==Duel.GetTurnPlayer()
and Duel.GetDrawCount(tp)>0
end end
function c97697678.filter(c) function c97697678.filter(c)
return c:IsSetCard(0xc) and c:IsAbleToHand() return c:IsSetCard(0xc) and c:IsAbleToHand()
end end
function c97697678.target(e,tp,eg,ep,ev,re,r,rp,chk) function c97697678.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c97697678.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.IsExistingMatchingCard(c97697678.filter,tp,LOCATION_DECK,0,1,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c97697678.operation(e,tp,eg,ep,ev,re,r,rp) function c97697678.operation(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1 if not aux.IsPlayerCanNormalDraw(tp) then return end
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown()then return end aux.GiveUpNormalDraw(e,tp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown()then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c97697678.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c97697678.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -34,7 +34,7 @@ end ...@@ -34,7 +34,7 @@ end
function c99426088.frcheck(tp,sg,fc) function c99426088.frcheck(tp,sg,fc)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end end
function c99426088.gcheck(sg) function c99426088.gcheck(sg,ec)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end end
function c99426088.target(e,tp,eg,ep,ev,re,r,rp,chk) function c99426088.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -156,8 +156,8 @@ SUMMON_VALUE_ASSAULT_MODE =0x15 -- ...@@ -156,8 +156,8 @@ SUMMON_VALUE_ASSAULT_MODE =0x15 --
SUMMON_VALUE_LV =0x1000 --对应LV怪兽的效果 SUMMON_VALUE_LV =0x1000 --对应LV怪兽的效果
SUMMON_VALUE_GLADIATOR =0x2000 --剑斗兽 SUMMON_VALUE_GLADIATOR =0x2000 --剑斗兽
SUMMON_VALUE_EVOLTILE =0x4000 --进化虫 SUMMON_VALUE_EVOLTILE =0x4000 --进化虫
SUMMON_VALUE_DARK_FUSION =0x43000016 -- SUMMON_VALUE_DARK_FUSION =SUMMON_TYPE_FUSION|0x16 --
SUMMON_VALUE_FOSSIL_FUSION =0x43000017 -- SUMMON_VALUE_FOSSIL_FUSION =SUMMON_TYPE_FUSION|0x17 --
--Status --卡片当前状态 --Status --卡片当前状态
STATUS_DISABLED =0x0001 --效果被无效 STATUS_DISABLED =0x0001 --效果被无效
STATUS_TO_ENABLE =0x0002 --将变成有效 STATUS_TO_ENABLE =0x0002 --将变成有效
...@@ -648,6 +648,7 @@ EVENT_PREDRAW =1113 --抽卡阶段通常抽卡前 ...@@ -648,6 +648,7 @@ EVENT_PREDRAW =1113 --抽卡阶段通常抽卡前
EVENT_SUMMON_NEGATED =1114 --召唤被无效时 EVENT_SUMMON_NEGATED =1114 --召唤被无效时
EVENT_FLIP_SUMMON_NEGATED =1115 --反转召唤被无效时 EVENT_FLIP_SUMMON_NEGATED =1115 --反转召唤被无效时
EVENT_SPSUMMON_NEGATED =1116 --特殊召唤被无效时 EVENT_SPSUMMON_NEGATED =1116 --特殊召唤被无效时
EVENT_SPSUMMON_SUCCESS_G_P =1117 --EFFECT_SPSUMMON_PROC_G特殊召唤成功前(只能使用EFFECT_TYPE_CONTINUOUS)
EVENT_CONTROL_CHANGED =1120 --控制权变更 EVENT_CONTROL_CHANGED =1120 --控制权变更
EVENT_EQUIP =1121 --装备卡装备时 EVENT_EQUIP =1121 --装备卡装备时
EVENT_ATTACK_ANNOUNCE =1130 --攻击宣言时 EVENT_ATTACK_ANNOUNCE =1130 --攻击宣言时
...@@ -880,5 +881,6 @@ CARD_MARINE_DOLPHIN =78734254 --海洋海豚(double name) ...@@ -880,5 +881,6 @@ CARD_MARINE_DOLPHIN =78734254 --海洋海豚(double name)
CARD_TWINKLE_MOSS =13857930 --光輝苔蘚(double name) CARD_TWINKLE_MOSS =13857930 --光輝苔蘚(double name)
CARD_QUESTION =38723936 --谜题 CARD_QUESTION =38723936 --谜题
--Special flag effect id --Special flag effect id
FLAG_ID_CHAINING =1 FLAG_ID_CHAINING =1
FLAG_ID_UNION =2 FLAG_ID_UNION =2
FLAG_ID_NO_NORMAL_DRAW =3
This diff is collapsed.
...@@ -1502,3 +1502,27 @@ function Auxiliary.SameValueCheck(g,f) ...@@ -1502,3 +1502,27 @@ function Auxiliary.SameValueCheck(g,f)
end end
return v~=0 return v~=0
end end
---
---@param tp integer
---@return boolean
function Auxiliary.IsPlayerCanNormalDraw(tp)
return Duel.GetDrawCount(tp)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and not Duel.GetFlagEffect(tp,FLAG_ID_NO_NORMAL_DRAW)
end
---
---@param e Effect
---@param tp integer
---@param property? integer
function Auxiliary.GiveUpNormalDraw(e,tp,property)
property=property or 0
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET|property)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,FLAG_ID_NO_NORMAL_DRAW,RESET_PHASE+PHASE_DRAW,property,1)
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