Wish of the Skysavior
- Card ID:
120253064 - Format: Rush Duel
- Script:
Rush/Scripts/c120253064.lua
Stats
| Field | Value |
|---|---|
| Type | 0x4 |
| ATK | 0 |
| DEF | 0 |
| Level/Rank/Link | 0x0 |
| Race | 0x0 |
| Attribute | 0x0 |
| Category | 0x300420 |
Card Text
text
[REQUIREMENT]
When your opponent Normal or Special Summons a monster, place 1 WATER Attribute Warrior Type monster and 1 Fairy Type monster from your Graveyard on top of your Deck in any order.
[EFFECT]
Place 1 monster on your opponent's field on the bottom of the owner's Deck. Then, you can Set 1 "Skysavior Watch" or 1 "Fusion" from your Graveyard to your Spell & Trap Zone.Detected API Calls
Auxiliary.NecroValleyFilterAuxiliary.StringidCard.GetRaceCard.GetSummonPlayerCard.IsAbleToDeckCard.IsAbleToDeckOrExtraAsCostCard.IsAttributeCard.IsCodeCard.IsRaceCard.IsSSetableCard.RegisterEffectDuel.GetMatchingGroupDuel.IsExistingMatchingCardDuel.SetOperationInfoEffect.CloneEffect.CreateEffectEffect.SetCategoryEffect.SetCodeEffect.SetConditionEffect.SetCostEffect.SetOperationEffect.SetPropertyEffect.SetTargetEffect.SetTypeGroup.CloneGroup.GetClassCountGroup.GetCountGroup.IsExistsRushDuel.AddCodeListRushDuel.CanSelectAndSetRushDuel.CostSendGraveSubToDeckTopRushDuel.SelectAndDoActionRushDuel.SendToDeckBottom
Script
lua
local cm,m=GetID()
local list={120235053,120196050}
cm.name="苍救的祈愿"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
--Activate
function cm.confilter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.costfilter(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_WARRIOR)) or c:IsRace(RACE_FAIRY)) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.costcheck(g)
return g:GetClassCount(Card.GetRace)==g:GetCount()
end
function cm.setfilter(c)
return c:IsCode(list[1],list[2]) and c:IsSSetable()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,1-tp)
end
cm.cost=RD.CostSendGraveSubToDeckTop(cm.costfilter,cm.costcheck,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.SendToDeckBottom(g,e,tp,REASON_EFFECT)~=0 then
RD.CanSelectAndSet(aux.Stringid(m,1),aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,true)
end
end)
end