Commit 3a638c37 authored by mercury233's avatar mercury233

new cards VJMP+WJMP

parent f7d73b1b
--希望の魔術師
function c67865534.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--disable attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67865534,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c67865534.atktg)
e1:SetOperation(c67865534.atkop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67865534,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,67865534)
e2:SetCost(c67865534.spcost)
e2:SetTarget(c67865534.sptg)
e2:SetOperation(c67865534.spop)
c:RegisterEffect(e2)
--material
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67865534,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c67865534.xyzcon)
e3:SetTarget(c67865534.xyztg)
e3:SetOperation(c67865534.xyzop)
c:RegisterEffect(e3)
end
c67865534.pendulum_level=4
function c67865534.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c67865534.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.NegateAttack() then
Duel.BreakEffect()
Duel.Destroy(c,REASON_EFFECT)
end
end
function c67865534.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c67865534.spfilter(c,e,tp)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c67865534.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c67865534.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c67865534.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67865534.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and c:IsRelateToEffect(e) and c:IsFaceup()
and Duel.SelectEffectYesNo(tp,c,aux.Stringid(67865534,3)) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
function c67865534.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c67865534.xyzfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER)
end
function c67865534.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c67865534.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67865534.xyzfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67865534,4))
local g=Duel.SelectTarget(tp,c67865534.xyzfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c67865534.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.Overlay(c,Group.FromCards(tc))
end
end
--闇鋼龍 ダークネスメタル
function c79266769.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,nil,c79266769.spcheck)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79266769,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,79266769)
e1:SetTarget(c79266769.sptg)
e1:SetOperation(c79266769.spop)
c:RegisterEffect(e1)
end
function c79266769.spcheck(g)
return g:GetClassCount(Card.GetLinkRace)==1
and g:GetClassCount(Card.GetLinkAttribute)==1
end
function c79266769.filter(c,e,tp,zone)
return (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone)
end
function c79266769.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c79266769.filter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c79266769.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c79266769.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c79266769.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local zone=bit.band(c:GetLinkedZone(tp),0x1f)
if tc and tc:IsRelateToEffect(e) and zone~=0
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE,zone) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_REDIRECT)
e3:SetValue(LOCATION_DECKBOT)
tc:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetTargetRange(1,0)
e4:SetTarget(c79266769.splimit)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
function c79266769.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsType(TYPE_LINK)
end
--サクリファイス・アニマ
function c94259633.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c94259633.matfilter,1)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(94259633,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,94259633)
e1:SetCondition(c94259633.eqcon)
e1:SetTarget(c94259633.eqtg)
e1:SetOperation(c94259633.eqop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(c94259633.adcon)
e2:SetValue(c94259633.atkval)
c:RegisterEffect(e2)
end
function c94259633.matfilter(c)
return c:IsLevel(1) and not c:IsLinkType(TYPE_TOKEN)
end
function c94259633.eqcon(e,tp,eg,ep,ev,re,r,rp)
return c94259633.can_equip_monster(e:GetHandler())
end
function c94259633.eqfilter(c)
return c:GetFlagEffect(94259633)~=0
end
function c94259633.can_equip_monster(c)
local g=c:GetEquipGroup():Filter(c94259633.eqfilter,nil)
return g:GetCount()==0
end
function c94259633.eqfilter2(c,tp,lg)
return c:IsFaceup() and (c:IsAbleToChangeControler() or c:IsControler(tp)) and lg:IsContains(c)
end
function c94259633.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c94259633.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c94259633.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp,lg)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c94259633.eqlimit(e,c)
return e:GetOwner()==c
end
function c94259633.equip_monster(c,tp,tc)
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(94259633,RESET_EVENT+RESETS_STANDARD,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c94259633.eqlimit)
tc:RegisterEffect(e1)
end
function c94259633.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
if c:IsRelateToEffect(e) then
c94259633.equip_monster(c,tp,tc)
else Duel.SendtoGrave(tc,REASON_EFFECT) end
end
end
function c94259633.adcon(e)
local c=e:GetHandler()
local g=c:GetEquipGroup():Filter(c94259633.eqfilter,nil)
return g:GetCount()>0
end
function c94259633.atkval(e,c)
local c=e:GetHandler()
local g=c:GetEquipGroup():Filter(c94259633.eqfilter,nil)
local atk=g:GetFirst():GetTextAttack()
if bit.band(g:GetFirst():GetOriginalType(),TYPE_MONSTER)==0 or atk<0 then
return 0
else
return atk
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