Gold Rush
- Card ID:
120247059 - Format: Rush Duel
- Script:
Rush/Scripts/c120247059.lua
Stats
| Field | Value |
|---|---|
| Type | 0x4 |
| ATK | 0 |
| DEF | 0 |
| Level/Rank/Link | 0x0 |
| Race | 0x0 |
| Attribute | 0x0 |
| Category | 0x40100 |
Card Text
text
[REQUIREMENT]
When your opponent Normal or Special Summons a Level 7 or higher monster(s) face-up, send all monsters from your field to the Graveyard.
[EFFECT]
Draw 3 cards and reveal them. If a Level 7 monster(s) is among them, you can Special Summon any number of those Level 7 monster(s) to your field in face-down Defense Position.Detected API Calls
Auxiliary.StringidCard.GetSummonPlayerCard.IsAbleToGraveAsCostCard.IsFaceupCard.IsLevelAboveCard.RegisterEffectDuel.ConfirmCardsDuel.DrawDuel.GetChainInfoDuel.GetDecktopGroupDuel.GetFieldGroupDuel.IsPlayerCanDrawDuel.SendtoGraveDuel.ShuffleHandEffect.CloneEffect.CreateEffectEffect.SetCategoryEffect.SetCodeEffect.SetConditionEffect.SetCostEffect.SetOperationEffect.SetPropertyEffect.SetTargetEffect.SetTypeGroup.CloneGroup.FilterCountGroup.GetCountGroup.IsContainsGroup.IsExistsRushDuel.CanSelectAndSpecialSummonRushDuel.FilterRushDuel.IsCanBeSpecialSummonedRushDuel.TargetDraw
Script
lua
local cm,m=GetID()
cm.name="淘金超速潮"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+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 and c:IsFaceup() and c:IsLevelAbove(7)
end
function cm.spfilter(c,e,tp,g)
return g:IsContains(c) and c:IsLevelAbove(7) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEDOWN_DEFENSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,1-tp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local ct=g:GetCount()
if chk==0 then return ct>0 and g:FilterCount(Card.IsAbleToGraveAsCost,nil)==ct end
Duel.SendtoGrave(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
RD.TargetDraw(tp,3)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g=Duel.GetDecktopGroup(p,d)
if Duel.Draw(p,d,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-p,g)
local spfilter=RD.Filter(cm.spfilter,e,tp,g)
RD.FaceDownSpecialSummonConfirm=true
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),spfilter,tp,LOCATION_HAND,0,1,99,nil,e,POS_FACEDOWN_DEFENSE,true)
Duel.ShuffleHand(p)
end
end