Commit b88d87db authored by 大崎甜花's avatar 大崎甜花 Committed by GitHub

jnmlp lua

parent 0fdfb80b
......@@ -6,13 +6,13 @@ function cm.initial_effect(c)
--fusion
c:SetSPSummonOnce(m)
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,cm.matfilter,1,1,true)
aux.AddFusionProcFun2(c,cm.matfilter,cm.matfilter1,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
......@@ -89,8 +89,8 @@ end
function cm.matfilter(c)
return cm.check_fusion_set_Skayarder(c)
end
function cm.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
function cm.matfilter1(c)
return c:IsFusionType(TYPE_EFFECT)
end
function cm.rsfilter(c,fc,tp)
return cm.Skay(c) and c:IsLevel(8)
......
......@@ -43,8 +43,9 @@ function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)~=0 then
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
......@@ -55,22 +56,22 @@ end
function cm.spcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1
end
function cm.xyzfilter(c,e,tp)
function cm.xyzfilter(c,e,tp,mat)
return c:IsType(TYPE_XYZ) and c:IsCode(14000656) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mat,c)>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0
and aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
......
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetDescription(aux.Stringid(17060915,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
......@@ -16,7 +16,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--spsummon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetDescription(aux.Stringid(17060915,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
--synchro level
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetDescription(aux.Stringid(17060915,2))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_SYNCHRO_LEVEL)
......@@ -78,13 +78,12 @@ end
function cm.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_GRAVE)
return ft>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,ft)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_GRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ft)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.slevel(e,c)
......
......@@ -99,7 +99,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.askcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
return Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.IsAbleToEnterBP()
end
function cm.askop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -32,6 +32,7 @@ function c30557012.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetOperation(c30557012.op)
Duel.RegisterEffect(e3,tp)
end
......@@ -45,7 +46,7 @@ function c30557012.op(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT+REASON_REVEAL)
else
Duel.MoveSequence(tc,1)
Duel.MoveSequence(gc,1)
end
end
end
......
......@@ -103,7 +103,7 @@ function c33400208.disop(e,tp,eg,ep,ev,re,r,rp)
end
end
if tc:IsCode(ac) then
Duel.Damage(1-tp,500,REASON_EFFECT)
Duel.Damage(1-tp,1000,REASON_EFFECT)
if tc1:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(33400208,4))then
Duel.SendtoGrave(tc1,REASON_EFFECT)
end
......
......@@ -111,6 +111,7 @@ function c33400220.dmop(e,tp,eg,ep,ev,re,r,rp)
local t2=bit.band(tc:GetType(),0x7)
if t1==t2 then
Duel.Damage(1-tp,1000,REASON_EFFECT)
if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(33400220,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil)
......@@ -134,6 +135,7 @@ function c33400220.dmop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
end
end
end
if tc:IsCode(ac) then
Duel.Damage(1-tp,1000,REASON_EFFECT)
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
......
......@@ -149,7 +149,7 @@ end
function c47530026.ttcon(e,c,minc)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c47530026.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:IsLevelAbove(7) and minc<=2 and Duel.CheckTribute(c,2,2,mg
return c:IsLevelAbove(7) and minc<=2 and Duel.CheckTribute(c,2,2,mg)
end
function c47530026.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c47530026.otfilter,0,LOCATION_MZONE,0,nil)
......
......@@ -17,6 +17,7 @@ function c47530140.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,47530141)
e2:SetTarget(c47530140.distg)
e2:SetOperation(c47530140.disop)
c:RegisterEffect(e2)
......
......@@ -31,7 +31,7 @@ function c60152611.e2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c60152611.e2tgfilter(c)
return return c:IsSetCard(0x6b27) and c:IsSummonable(true,nil)
return c:IsSetCard(0x6b27) and c:IsSummonable(true,nil)
end
function c60152611.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152611.e2tgfilter,tp,LOCATION_HAND,0,1,nil) end
......
......@@ -36,7 +36,6 @@ function c65010556.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c65010556.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SpecialSummonStep(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
......@@ -48,7 +47,7 @@ function c65010556.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_DECKBOT)
c:RegisterEffect(e2)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
......
......@@ -53,7 +53,7 @@ function c65050202.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c65050202.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c65050202.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c65050202.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectTarget(tp,c65050202.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c65050202.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -54,7 +54,7 @@ function c65050204.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget()
local g=Duel.SelectMatchingCard(tp,c65050204.spfil,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g and Duel.SpecialSummon(g,0,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then
if g and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
......
......@@ -21,7 +21,7 @@ function cm.initial_effect(c)
e4:SetOperation(cm.drop)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_MZONE)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(cm.eftg)
e5:SetLabelObject(e4)
......@@ -37,7 +37,7 @@ function cm.initial_effect(c)
e11:SetOperation(cm.recop)
local e55=Effect.CreateEffect(c)
e55:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e55:SetRange(LOCATION_MZONE)
e55:SetRange(LOCATION_SZONE)
e55:SetTargetRange(LOCATION_MZONE,0)
e55:SetTarget(cm.eftg)
e55:SetLabelObject(e11)
......
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