Commit ebddec45 authored by mercury233's avatar mercury233

new card LVP2-JP046

parent 90a50f82
...@@ -49,6 +49,7 @@ function c27970830.initial_effect(c) ...@@ -49,6 +49,7 @@ function c27970830.initial_effect(c)
e6:SetOperation(c27970830.op3) e6:SetOperation(c27970830.op3)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
c27970830.counter_add_list={0x3}
function c27970830.ctfilter(c) function c27970830.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) return c:IsFaceup() and c:IsSetCard(0x3d)
end end
......
...@@ -27,6 +27,7 @@ function c47436247.initial_effect(c) ...@@ -27,6 +27,7 @@ function c47436247.initial_effect(c)
e4:SetOperation(c47436247.spop) e4:SetOperation(c47436247.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c47436247.counter_add_list={0x3}
function c47436247.ctfilter(c) function c47436247.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) return c:IsFaceup() and c:IsSetCard(0x3d)
end end
...@@ -42,7 +43,7 @@ function c47436247.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,7 +43,7 @@ function c47436247.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c47436247.filter(c,ct,e,tp) function c47436247.filter(c,ct,e,tp)
return c:IsLevelBelow(ct) and (c:IsSetCard(0x3d) or c:IsSetCard(0x20)) return c:IsLevelBelow(ct) and (c:IsSetCard(0x3d) or c:IsSetCard(0x20))
and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c47436247.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c47436247.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -25,6 +25,7 @@ function c53819808.initial_effect(c) ...@@ -25,6 +25,7 @@ function c53819808.initial_effect(c)
e4:SetValue(c53819808.val) e4:SetValue(c53819808.val)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c53819808.counter_add_list={0x3}
function c53819808.ctfilter(c) function c53819808.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) return c:IsFaceup() and c:IsSetCard(0x3d)
end end
......
...@@ -28,6 +28,7 @@ function c72345736.initial_effect(c) ...@@ -28,6 +28,7 @@ function c72345736.initial_effect(c)
e4:SetOperation(c72345736.drop) e4:SetOperation(c72345736.drop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c72345736.counter_add_list={0x3}
function c72345736.ctfilter(c) function c72345736.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) return c:IsFaceup() and c:IsSetCard(0x3d)
end end
......
--六武衆の軍大将
function c74752631.initial_effect(c)
c:EnableCounterPermit(0x3)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_WARRIOR),2,2,c74752631.lcheck)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74752631,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,74752631)
e1:SetCondition(c74752631.thcon)
e1:SetCost(c74752631.thcost)
e1:SetTarget(c74752631.thtg)
e1:SetOperation(c74752631.thop)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c74752631.ctcon)
e2:SetOperation(c74752631.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atkup
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c74752631.atkval)
c:RegisterEffect(e4)
end
c74752631.counter_add_list={0x3}
function c74752631.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3d)
end
function c74752631.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c74752631.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c74752631.thfilter(c)
return aux.IsCounterAdded(c,0x3) and c:IsAbleToHand()
end
function c74752631.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74752631.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c74752631.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c74752631.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c74752631.cfilter(c,ec)
if c:IsLocation(LOCATION_MZONE) then
return c:IsSetCard(0x3d) and c:IsFaceup() and ec:GetLinkedGroup():IsContains(c)
else
return c:IsPreviousSetCard(0x3d) and c:IsPreviousPosition(POS_FACEUP)
and bit.extract(ec:GetLinkedZone(c:GetPreviousControler()),c:GetPreviousSequence())~=0
end
end
function c74752631.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c74752631.cfilter,1,nil,e:GetHandler())
end
function c74752631.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x3,1)
end
function c74752631.atkval(e,c)
return Duel.GetCounter(c:GetControler(),1,0,0x3)*100
end
...@@ -31,6 +31,7 @@ function c98162021.initial_effect(c) ...@@ -31,6 +31,7 @@ function c98162021.initial_effect(c)
e3:SetOperation(c98162021.addc2) e3:SetOperation(c98162021.addc2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c98162021.counter_add_list={0x3}
function c98162021.addct(e,tp,eg,ep,ev,re,r,rp,chk) function c98162021.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3)
......
...@@ -1902,6 +1902,13 @@ function Auxiliary.IsCodeListed(c,code) ...@@ -1902,6 +1902,13 @@ function Auxiliary.IsCodeListed(c,code)
end end
return false return false
end end
function Auxiliary.IsCounterAdded(c,counter)
if not c.counter_add_list then return false end
for i,ccounter in ipairs(c.counter_add_list) do
if counter==ccounter then return true end
end
return false
end
function Auxiliary.GetColumn(c,p) function Auxiliary.GetColumn(c,p)
local seq=c:GetSequence() local seq=c:GetSequence()
if c:IsLocation(LOCATION_MZONE) then if c:IsLocation(LOCATION_MZONE) then
......
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