Major Breaking News!
- Card ID:
120304060 - Format: Rush Duel
- Script:
Rush/Scripts/c120304060.lua
Stats
| Field | Value |
|---|---|
| Type | 0x4 |
| ATK | 0 |
| DEF | 0 |
| Level/Rank/Link | 0x0 |
| Race | 0x0 |
| Attribute | 0x0 |
| Category | 0x340020 |
Card Text
text
This card's name becomes "Soul of a Reporter" while in the Graveyard.
[REQUIREMENT]
When a card(s) is sent to your opponent's Graveyard during their Main Phase.
[EFFECT]
Place up to 2 cards from your opponent's Graveyard on top of the Deck in any order. Then, you can Special Summon up to 2 EARTH Attribute Machine Type monsters from your hand to your field in face-up Defense Position.Detected API Calls
Auxiliary.NecroValleyFilterAuxiliary.StringidCard.GetOwnerCard.IsAbleToDeckCard.IsAttributeCard.IsPreviousLocationCard.IsRaceCard.RegisterEffectDuel.GetMatchingGroupDuel.GetTurnPlayerDuel.IsExistingMatchingCardDuel.RaiseEventDuel.RegisterEffectDuel.SetOperationInfoEffect.CreateEffectEffect.GetOwnerEffect.SetCategoryEffect.SetCodeEffect.SetConditionEffect.SetOperationEffect.SetPropertyEffect.SetTargetEffect.SetTypeGroup.FilterGroup.GetCountGroup.IsExistsRushDuel.AddCodeListRushDuel.CanSelectAndSpecialSummonRushDuel.EnableChangeCodeRushDuel.IsCanBeSpecialSummonedRushDuel.IsMainPhaseRushDuel.SelectAndDoActionRushDuel.SendToDeckTop
Script
lua
local cm,m=GetID()
local list={120145054}
cm.name="发生大事件!"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Change Code
RD.EnableChangeCode(c,list[1],LOCATION_GRAVE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CUSTOM+m)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--Event
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(cm.event)
Duel.RegisterEffect(ge1,0)
end
end
--Activate
function cm.filter(c,tp)
return c:GetOwner()==tp
end
function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and eg:IsExists(cm.filter,1,nil,1-tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,2,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,2,2,nil,function(g)
if RD.SendToDeckTop(g,e,tp,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),cm.spfilter,tp,LOCATION_HAND,0,1,2,nil,e,POS_FACEUP_DEFENSE,true)
end
end)
end
--Event
function cm.event(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsPreviousLocation,nil,LOCATION_DECK)
if RD.IsMainPhase() then
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,g:GetCount())
end
end