Commit 6b3c6aa4 authored by Tachibana's avatar Tachibana

1145141919810

parent c7bbe3c8
Pipeline #14129 passed with stages
in 30 minutes and 25 seconds
No preview for this file type
......@@ -7,33 +7,34 @@ function c112004.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetCountLimit(1,112004)
e1:SetTarget(c112004.target)
e1:SetOperation(c112004.operation)
c:RegisterEffect(e1)
end
function c112004.tfil(c)
return c:IsAbleToHand() and (c:IsSetCard(0xca7) or c:IsSetCard(0xca8))
function c112004.thfilter(c)
return c:IsSetCard(0xca7,0xca8) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
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
local g=Duel.SelectMatchingCard(tp,c112004.tfil,tp,LOCATION_DECK,0,1,2,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,nil,0,0)
if chk==0 then return Duel.IsExistingMatchingCard(c112004.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c112004.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
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())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c112004.splimit1)
e1:SetTarget(c112004.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c112004.splimit1(e,c,tp,sumtp,sumpos)
return not c:IsType(TYPE_NORMAL)
function c112004.splimit(e,c)
return c:GetType()&TYPE_NORMAL==0
end
......@@ -20,6 +20,7 @@ function c112010.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,112910+EFFECT_COUNT_CODE_DUEL)
e2:SetCost(c112010.thcost)
e2:SetTarget(c112010.thtg)
e2:SetOperation(c112010.thop)
......@@ -80,5 +81,5 @@ function c112010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c112010.splimit1(e,c,tp,sumtp,sumpos)
return not c:IsType(TYPE_NORMAL)
return c:GetType()&TYPE_NORMAL==0
end
......@@ -43,8 +43,5 @@ function c112011.op(e,tp,eg,ep,ev,re,r,rp)
end
end
function c112011.splimit1(e,c,tp,sumtp,sumpos)
return not c:IsType(TYPE_NORMAL)
return c:GetType()&TYPE_NORMAL==0
end
......@@ -9,6 +9,7 @@ function c112012.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetRange(LOCATION_PZONE)
e1:SetCost(c112012.spcost)
e1:SetTarget(c112012.sptg)
e1:SetOperation(c112012.spop)
c:RegisterEffect(e1)
--SpecialSummon 2
......@@ -18,24 +19,40 @@ function c112012.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_PZONE)
e2:SetCost(1,112012)
e2:SetCost(c112012.thcost)
e2:SetTarget(c112012.thtg)
e2:SetOperation(c112012.thop)
c:RegisterEffect(e2)
end
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(Duel.GetLP(tp)-1)
Duel.PayLPCost(tp,Duel.GetLP(tp)-1)
e:SetLabel(100,0)
local c=e:GetHandler()
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
function c112012.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local x=e:GetLabel()
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local atk=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(x)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
......
......@@ -88,7 +88,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
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)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
......@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.op)
......@@ -14,6 +15,7 @@ function cm.initial_effect(c)
local e2=e1:Clone()
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
......@@ -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)
end
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()
if Duel.Destroy(c,REASON_EFFECT)~=0 then
Duel.BreakEffect()
......
......@@ -15,6 +15,7 @@ function cm.initial_effect(c)
local e2=e1:Clone()
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
......
......@@ -12,6 +12,7 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCost(cm.cost)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -57,6 +58,11 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SendtoGrave(c,REASON_EFFECT)
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)
return c:IsFaceup() and c:IsSetCard(0xce0)
end
......@@ -71,6 +77,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.operation(e,tp)
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
ct=math.min(ct,2)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
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)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT)
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)
end
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)
local c=e:GetHandler()
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
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
local tc=g:GetFirst()
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)
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
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER)
Duel.SpecialSummon(c,0,tp,1-tp,true,false,POS_FACEUP_DEFENSE)
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
local g1=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
g:Merge(g1)
local sg=g:Select(1-tp,1,1,nil)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
if tc:IsType(TYPE_LINK) then
Duel.LinkSummon(tp,tc,nil,c)
else
Duel.SynchroSummon(tp,tc,c)
if Duel.SpecialSummon(c,0,tp,1-tp,true,false,POS_FACEUP_DEFENSE)>0 then
local g=Duel.GetMatchingGroup(function(card) return card:IsLinkSummonable(nil,c) end,1-tp,LOCATION_EXTRA,0,nil)
local g1=Duel.GetMatchingGroup(Card.IsSynchroSummonable,1-tp,LOCATION_EXTRA,0,nil,c)
g:Merge(g1)
local sg=g:Select(1-tp,1,1,nil)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
if tc:IsType(TYPE_LINK) then
Duel.LinkSummon(1-tp,tc,nil,c)
else
Duel.SynchroSummon(1-tp,tc,c)
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