Commit abb97503 authored by mercury233's avatar mercury233

newcard LVP2-JP056

parent ebddec45
......@@ -45,10 +45,14 @@ function c30929786.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c30929786.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30929786.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c30929786.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
if chk==0 then return Duel.IsExistingMatchingCard(c30929786.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
or (Duel.IsPlayerAffectedByEffect(tp,46241344) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) end
if Duel.IsExistingMatchingCard(c30929786.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c30929786.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c30929786.filter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true)
......
......@@ -56,10 +56,14 @@ function c43748308.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c43748308.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
if chk==0 then return Duel.IsExistingMatchingCard(c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
or Duel.IsPlayerAffectedByEffect(tp,46241344) end
if Duel.IsExistingMatchingCard(c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c43748308.spfilter(c,e,tp)
return c:IsSetCard(0x79) and c:GetCode()~=43748308 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
--炎星仙-ワシンジン
function c46241344.initial_effect(c)
c:SetSPSummonOnce(46241344)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_BEASTWARRIOR),2,2)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(46241344)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(46241344,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,46241344)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c46241344.thtg)
e2:SetOperation(c46241344.thop)
c:RegisterEffect(e2)
end
function c46241344.thfilter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c46241344.tgfilter(c)
return c:IsSetCard(0x79) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c46241344.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and c46241344.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c46241344.thfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(c46241344.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c46241344.thfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c46241344.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
local sg=Duel.GetMatchingGroup(c46241344.tgfilter,tp,LOCATION_DECK,0,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=sg:Select(tp,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
end
......@@ -46,10 +46,14 @@ function c6353603.filter1(c)
end
function c6353603.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingMatchingCard(c6353603.filter1,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c6353603.filter1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g1,REASON_COST)
if chk==0 then return Duel.IsExistingMatchingCard(c6353603.filter1,tp,LOCATION_ONFIELD,0,1,nil)
or (Duel.IsPlayerAffectedByEffect(tp,46241344) and Duel.IsExistingTarget(aux.TRUE,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)) end
if Duel.IsExistingMatchingCard(c6353603.filter1,tp,LOCATION_ONFIELD,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c6353603.filter1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g1,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
......
......@@ -48,10 +48,14 @@ function c70355994.filter1(c)
and Duel.IsExistingTarget(c70355994.filter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function c70355994.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c70355994.filter1,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c70355994.filter1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
if chk==0 then return Duel.IsExistingMatchingCard(c70355994.filter1,tp,LOCATION_ONFIELD,0,1,nil)
or (Duel.IsPlayerAffectedByEffect(tp,46241344) and Duel.IsExistingTarget(c70355994.filter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)) end
if Duel.IsExistingMatchingCard(c70355994.filter1,tp,LOCATION_ONFIELD,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c70355994.filter1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c70355994.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
......@@ -54,10 +54,14 @@ function c75132317.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c75132317.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
if chk==0 then return Duel.IsExistingMatchingCard(c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
or Duel.IsPlayerAffectedByEffect(tp,46241344) end
if Duel.IsExistingMatchingCard(c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c75132317.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -15,29 +15,25 @@ end
function c92572371.cfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and (c:IsSetCard(0x79) or c:IsSetCard(0x7c)) and c:IsAbleToGraveAsCost()
end
function c92572371.mzfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5
function c92572371.cfilter1(c,g,tp)
return g:IsExists(c92572371.cfilter2,1,c,c,tp)
end
function c92572371.cfilter2(c,mc,tp)
return Duel.GetMZoneCount(tp,Group.FromCards(c,mc))>0
end
function c92572371.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
local sg=Duel.GetMatchingGroup(c92572371.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return sg:GetCount()>=2
and (ft>0 or (ct<3 and sg:IsExists(c92572371.mzfilter,ct,nil))) end
local g=nil
if ft<=0 then
if chk==0 then return sg:IsExists(c92572371.cfilter1,1,nil,sg,tp)
or (Duel.IsPlayerAffectedByEffect(tp,46241344) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end
if sg:IsExists(c92572371.cfilter1,1,nil,sg,tp)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=sg:FilterSelect(tp,c92572371.mzfilter,ct,ct,nil)
if ct<2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=sg:Select(tp,2-ct,2-ct,g)
g:Merge(g1)
end
else
local g1=sg:FilterSelect(tp,c92572371.cfilter1,1,1,nil,sg,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=sg:Select(tp,2,2,nil)
local g2=sg:FilterSelect(tp,c92572371.cfilter2,1,1,g1:GetFirst(),g1:GetFirst(),tp)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
Duel.SendtoGrave(g,REASON_COST)
end
function c92572371.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
......
......@@ -89,10 +89,14 @@ function c96381979.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c96381979.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96381979.cfilter,tp,LOCATION_ONFIELD,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c96381979.cfilter,tp,LOCATION_ONFIELD,0,3,3,nil)
Duel.SendtoGrave(g,REASON_COST)
if chk==0 then return Duel.IsExistingMatchingCard(c96381979.cfilter,tp,LOCATION_ONFIELD,0,3,nil)
or Duel.IsPlayerAffectedByEffect(tp,46241344) end
if Duel.IsExistingMatchingCard(c96381979.cfilter,tp,LOCATION_ONFIELD,0,3,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c96381979.cfilter,tp,LOCATION_ONFIELD,0,3,3,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c96381979.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_BEASTWARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
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