Commit 6b3c6aa4 authored by Tachibana's avatar Tachibana

1145141919810

parent c7bbe3c8
No preview for this file type
...@@ -7,33 +7,34 @@ function c112004.initial_effect(c) ...@@ -7,33 +7,34 @@ function c112004.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1,112004)
e1:SetTarget(c112004.target) e1:SetTarget(c112004.target)
e1:SetOperation(c112004.operation) e1:SetOperation(c112004.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c112004.tfil(c) function c112004.thfilter(c)
return c:IsAbleToHand() and (c:IsSetCard(0xca7) or c:IsSetCard(0xca8)) return c:IsSetCard(0xca7,0xca8) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c112004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c112004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c112004.tfil,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c112004.thfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c112004.tfil,tp,LOCATION_DECK,0,1,2,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,nil,0,0)
end end
function c112004.operation(e,tp,eg,ep,ev,re,r,rp) function c112004.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.SendtoHand(tc,tp,REASON_EFFECT) local g=Duel.SelectMatchingCard(tp,c112004.thfilter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c112004.splimit1) e1:SetTarget(c112004.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c112004.splimit1(e,c,tp,sumtp,sumpos) function c112004.splimit(e,c)
return not c:IsType(TYPE_NORMAL) return c:GetType()&TYPE_NORMAL==0
end end
...@@ -20,6 +20,7 @@ function c112010.initial_effect(c) ...@@ -20,6 +20,7 @@ function c112010.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,112910+EFFECT_COUNT_CODE_DUEL)
e2:SetCost(c112010.thcost) e2:SetCost(c112010.thcost)
e2:SetTarget(c112010.thtg) e2:SetTarget(c112010.thtg)
e2:SetOperation(c112010.thop) e2:SetOperation(c112010.thop)
...@@ -80,5 +81,5 @@ function c112010.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,5 +81,5 @@ function c112010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c112010.splimit1(e,c,tp,sumtp,sumpos) function c112010.splimit1(e,c,tp,sumtp,sumpos)
return not c:IsType(TYPE_NORMAL) return c:GetType()&TYPE_NORMAL==0
end end
...@@ -43,8 +43,5 @@ function c112011.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,8 +43,5 @@ function c112011.op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c112011.splimit1(e,c,tp,sumtp,sumpos) function c112011.splimit1(e,c,tp,sumtp,sumpos)
return not c:IsType(TYPE_NORMAL) return c:GetType()&TYPE_NORMAL==0
end end
...@@ -9,6 +9,7 @@ function c112012.initial_effect(c) ...@@ -9,6 +9,7 @@ function c112012.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCost(c112012.spcost) e1:SetCost(c112012.spcost)
e1:SetTarget(c112012.sptg)
e1:SetOperation(c112012.spop) e1:SetOperation(c112012.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--SpecialSummon 2 --SpecialSummon 2
...@@ -18,24 +19,40 @@ function c112012.initial_effect(c) ...@@ -18,24 +19,40 @@ function c112012.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetCost(1,112012)
e2:SetCost(c112012.thcost) e2:SetCost(c112012.thcost)
e2:SetTarget(c112012.thtg) e2:SetTarget(c112012.thtg)
e2:SetOperation(c112012.thop) e2:SetOperation(c112012.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c112012.spcost(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c112012.spcost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end e:SetLabel(100,0)
e:SetLabel(Duel.GetLP(tp)-1) local c=e:GetHandler()
Duel.PayLPCost(tp,Duel.GetLP(tp)-1) local lp=Duel.GetLP(tp)
if chk==0 then return Duel.CheckLPCost(tp,lp-1,true) end
e:SetLabel(100,lp-1)
Duel.PayLPCost(tp,lp-1,true)
end
function c112012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local label,atk=e:GetLabel()
if chk==0 then
e:SetLabel(0,0)
if label~=100 then return false end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
e:SetLabel(0,0)
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c112012.spop(e,tp,eg,ep,ev,re,r,rp) function c112012.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local x=e:GetLabel() if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local atk=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(x) e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
......
...@@ -88,7 +88,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -88,7 +88,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=3 then if g:GetCount()>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
...@@ -7,6 +7,7 @@ function cm.initial_effect(c) ...@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.op) e1:SetOperation(cm.op)
...@@ -14,6 +15,7 @@ function cm.initial_effect(c) ...@@ -14,6 +15,7 @@ function cm.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(cm.target2) e2:SetTarget(cm.target2)
e2:SetOperation(cm.op2) e2:SetOperation(cm.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -28,7 +30,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +30,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.op(e,tp) function cm.op(e,tp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM,CHAININFO_TARGET_PLAYER) local d,p=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM,CHAININFO_TARGET_PLAYER)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.Destroy(c,REASON_EFFECT)~=0 then if Duel.Destroy(c,REASON_EFFECT)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -15,6 +15,7 @@ function cm.initial_effect(c) ...@@ -15,6 +15,7 @@ function cm.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(cm.target2) e2:SetTarget(cm.target2)
e2:SetOperation(cm.op2) e2:SetOperation(cm.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -12,6 +12,7 @@ function cm.initial_effect(c) ...@@ -12,6 +12,7 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCost(cm.cost)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
...@@ -57,6 +58,11 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,6 +58,11 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetOverlayCount()
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,ct,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,ct,ct,REASON_COST)
end
function cm.check(c) function cm.check(c)
return c:IsFaceup() and c:IsSetCard(0xce0) return c:IsFaceup() and c:IsSetCard(0xce0)
end end
...@@ -71,6 +77,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -71,6 +77,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp) function cm.operation(e,tp)
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE) local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
ct=math.min(ct,2)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,cm.check3,tp,LOCATION_GRAVE,0,1,ct,nil) local sg=Duel.SelectMatchingCard(tp,cm.check3,tp,LOCATION_GRAVE,0,1,ct,nil)
......
...@@ -60,7 +60,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) return c:IsReason(REASON_EFFECT)
end end
function cm.thfilter(c) function cm.thfilter(c,e,tp)
return c:IsSetCard(0xce0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) return c:IsSetCard(0xce0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -71,7 +71,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,7 +71,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
......
...@@ -38,18 +38,18 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,18 +38,18 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0xce0,TYPES_TOKEN_MONSTER+TYPE_TUNER,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_DARK) then if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0xce0,TYPES_TOKEN_MONSTER+TYPE_TUNER,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER) c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER)
Duel.SpecialSummon(c,0,tp,1-tp,true,false,POS_FACEUP_DEFENSE) if Duel.SpecialSummon(c,0,tp,1-tp,true,false,POS_FACEUP_DEFENSE)>0 then
Duel.BreakEffect() local g=Duel.GetMatchingGroup(function(card) return card:IsLinkSummonable(nil,c) end,1-tp,LOCATION_EXTRA,0,nil)
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c) local g1=Duel.GetMatchingGroup(Card.IsSynchroSummonable,1-tp,LOCATION_EXTRA,0,nil,c)
local g1=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c) g:Merge(g1)
g:Merge(g1) local sg=g:Select(1-tp,1,1,nil)
local sg=g:Select(1-tp,1,1,nil) if sg:GetCount()>0 then
if sg:GetCount()>0 then local tc=sg:GetFirst()
local tc=sg:GetFirst() if tc:IsType(TYPE_LINK) then
if tc:IsType(TYPE_LINK) then Duel.LinkSummon(1-tp,tc,nil,c)
Duel.LinkSummon(tp,tc,nil,c) else
else Duel.SynchroSummon(1-tp,tc,c)
Duel.SynchroSummon(tp,tc,c) end
end end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment