Moonforce Ziggy
- Card ID:
120300014 - Format: Rush Duel
- Script:
Rush/Scripts/c120300014.lua
Stats
| Field | Value |
|---|---|
| Type | 0x21 |
| ATK | 0 |
| DEF | 1400 |
| Level/Rank/Link | 0x3 |
| Race | 0x40000000 |
| Attribute | 0x1 |
| Category | 0x2c00 |
Card Text
text
[REQUIREMENT]
Change the battle position of 1 face-up monster on your field.
[EFFECT]
Choose 1 face-up Level 8 or lower monster on your opponent's field. During your opponent's next turn, your opponent cannot attack with that monster. Then, you can place 1 monster from your Graveyard on the bottom of the Deck. If you do, this card gains 500 DEF until the end of your opponent's next turn.Detected API Calls
Auxiliary.NecroValleyFilterAuxiliary.StringidCard.GetFlagEffectCard.IsAbleToDeckCard.IsFaceupCard.IsImmuneToEffectCard.IsLevelBelowCard.IsRelateToEffectCard.IsTypeCard.RegisterEffectCard.RegisterFlagEffectDuel.GetTurnPlayerDuel.IsExistingMatchingCardEffect.CreateEffectEffect.GetHandlerEffect.GetLabelEffect.SetCategoryEffect.SetCodeEffect.SetConditionEffect.SetCostEffect.SetDescriptionEffect.SetLabelEffect.SetOperationEffect.SetPropertyEffect.SetRangeEffect.SetResetEffect.SetTargetEffect.SetTypeGroup.GetFirstRushDuel.AttachAtkDefRushDuel.CanSelectAndDoActionRushDuel.CostChangePositionRushDuel.IsCanChangePositionRushDuel.SelectAndDoActionRushDuel.SendToDeckBottom
Script
lua
local cm,m=GetID()
cm.name="月力睡刺猬"
function cm.initial_effect(c)
--Lock Attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Lock Attack
function cm.costfilter(c,e,tp)
return c:IsFaceup() and RD.IsCanChangePosition(c,e,tp,REASON_COST)
end
function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(8) and c:GetFlagEffect(FLAG_CANNOT_ATTACK_NEXT_TURN)==0
end
function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
cm.cost=RD.CostChangePosition(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetLabel(1-tp)
e1:SetCondition(cm.atkcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
if not tc:IsImmuneToEffect(e) then
tc:RegisterFlagEffect(FLAG_CANNOT_ATTACK_NEXT_TURN,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1)
RD.CanSelectAndDoAction(aux.Stringid(m,3),HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
local c=e:GetHandler()
if RD.SendToDeckBottom(g,e,tp,REASON_EFFECT)~=0
and c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,0,500,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
end
end)
end
end)
end
function cm.atkcon(e)
return Duel.GetTurnPlayer()==e:GetLabel()
end