Yes, I can help create a YGOPRO card script for the monster you've described. Below is the Lua script that defines the card and implements its effects according to your specifications.
--Custom Hieratic Link Monster
function c99999999.initial_effect(c)
--Enable Revive Limit
c:EnableReviveLimit()
--Link Summon Procedure
aux.AddLinkProcedure(c, c99999999.lfilter, 2, 99, c99999999.lcheck)
--Effect 1: Special Summon on Link Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99999999,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c99999999.spcon)
e1:SetTarget(c99999999.sptg)
e1:SetOperation(c99999999.spop)
c:RegisterEffect(e1)
--Effect 2: Negate opponent's card or effect activation
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99999999,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c99999999.negcon)
e2:SetCost(c99999999.negcost)
e2:SetTarget(c99999999.negtg)
e2:SetOperation(c99999999.negop)
c:RegisterEffect(e2)
--Effect 3: Special Summon Hieratic Xyz Monster when destroyed
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(99999999,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c99999999.spcon2)
e3:SetTarget(c99999999.sptg2)
e3:SetOperation(c99999999.spop2)
c:RegisterEffect(e3)
end
--Link Material Filter: Dragon monsters
function c99999999.lfilter(c)
return c:IsRace(RACE_DRAGON)
end
--Link Material Check: Includes at least 1 "Hieratic" monster
function c99999999.lcheck(g,lc)
return g:IsExists(Card.IsSetCard,1,nil,0x69)
end
--Effect 1 Condition: Link Summoned
function c99999999.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
--Effect 1 Filter: "Hieratic" or Normal Dragon Monster
function c99999999.spfilter(c,e,tp)
return (c:IsSetCard(0x69) or (c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL)))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
--Effect 1 Target: Special Summon target selection
function c99999999.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c99999999.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
--Effect 1 Operation: Special Summon and negate effects
function c99999999.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c99999999.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
--Negate its effects
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
end
--Effect 2 Condition: Opponent activates a card or effect
function c99999999.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainNegatable(ev)
end
--Effect 2 Cost: Tribute from hand or field
function c99999999.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c99999999.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c99999999.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_MZONE) then
Duel.Release(tc,REASON_COST)
else
Duel.SendtoGrave(tc,REASON_COST+REASON_RELEASE)
end
end
--Effect 2 Filter: "Hieratic" or Normal Dragon Monster
function c99999999.costfilter(c)
return (c:IsSetCard(0x69) or (c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL))) and (c:IsLocation(LOCATION_HAND+LOCATION_MZONE))
end
--Effect 2 Target: Negate and banish
function c99999999.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsAbleToRemove() then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
--Effect 2 Operation: Negate activation and banish
function c99999999.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
--Effect 3 Condition: Destroyed by opponent's card
function c99999999.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_MZONE)
end
--Effect 3 Filter: "Hieratic" Xyz Monster
function c99999999.spfilter3(c,e,tp)
return c:IsSetCard(0x69) and c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,true,true)
end
--Effect 3 Target: Special Summon from Extra Deck
function c99999999.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c99999999.spfilter3,tp,LOCATION_EXTRA,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
--Effect 3 Operation: Special Summon Xyz Monster
function c99999999.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c99999999.spfilter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
Explanation of the Script:
-
Link Summon Procedure:
- The monster requires 2 or more Dragon monsters, including at least 1 "Hieratic" monster.
aux.AddLinkProcedure is used with a custom material filter and a special check to ensure the materials meet the requirements.
-
Effect 1 - Special Summon on Link Summon:
- Condition: Activates when the card is Link Summoned.
- Action: Special Summons 1 "Hieratic" monster or 1 Normal Dragon monster from your hand, Deck, or GY in Defense Position with its effects negated.
-
Effect 2 - Negate Opponent's Activation:
- Condition: Can be activated once per turn when your opponent activates a card or effect.
- Cost: Tribute 1 "Hieratic" monster or 1 Normal Dragon monster from your hand or field.
- Action: Negate the activation, and if successful, banish that card.
-
Effect 3 - Special Summon on Destruction:
- Condition: When this card is destroyed by your opponent's card (by battle or card effect).
- Action: Special Summon 1 "Hieratic" Xyz Monster from your Extra Deck, ignoring its Summoning conditions.
Note:
- Replace
99999999 with the actual card ID you intend to use.
- The
0x69 in IsSetCard(0x69) represents the "Hieratic" archetype's set code. Ensure this matches the correct set code in your database.
- This script assumes you have the appropriate infrastructure in YGOPRO for custom cards and that the card database (
cards.cdb) is updated with the card's details.
Usage:
- Save this script as
c99999999.lua (replace 99999999 with your card ID).
- Place it in the
script folder of your YGOPRO installation.
- Ensure your card is defined in the card database with matching parameters (name, type, attribute, etc.).