Freshberry Collaboration
- Card ID:
120301071 - Format: Rush Duel
- Script:
Rush/Scripts/c120301071.lua
Stats
| Field | Value |
|---|---|
| Type | 0x21 |
| ATK | 100 |
| DEF | 500 |
| Level/Rank/Link | 0x5 |
| Race | 0x40 |
| Attribute | 0x2 |
| Category | 0x310802 |
Card Text
text
[REQUIREMENT]
During the turn you Normal Summoned this card, send 1 other card from your hand or field to the Graveyard.
[EFFECT]
Change 1 Attack Position monster on your field to face-up Defense Position. Then, if you sent a WATER Attribute Aqua Type monster to the Graveyard to meet the requirement, you can destroy 1 face-up Level 10 or lower non-Maximum Monster on your opponent's field. This turn, you can only attack with Aqua Type monsters.Detected API Calls
Auxiliary.StringidCard.IsAbleToGraveAsCostCard.IsAttackPosCard.IsAttributeCard.IsFaceupCard.IsLevelBelowCard.IsRaceCard.IsTypeCard.RegisterEffectDuel.DestroyDuel.GetFlagEffectDuel.GetMatchingGroupDuel.IsExistingMatchingCardDuel.RegisterFlagEffectDuel.SetOperationInfoEffect.CreateEffectEffect.GetLabelEffect.SetCategoryEffect.SetConditionEffect.SetCostEffect.SetDescriptionEffect.SetOperationEffect.SetRangeEffect.SetTargetEffect.SetTypeGroup.GetFirstRushDuel.CanSelectAndDoActionRushDuel.ChangePositionRushDuel.ConditionSummonTurnRushDuel.CostSendHandOrFieldToGraveRushDuel.CreateRaceCannotAttackEffectRushDuel.FilterRushDuel.IsCanChangePositionRushDuel.SelectAndDoAction
Script
lua
local cm,m=GetID()
cm.name="莓果新人合作"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.filter(c,e,tp)
return c:IsAttackPos() and RD.IsCanChangePosition(c,e,tp,REASON_EFFECT)
end
function cm.desfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_MAXIMUM) and c:IsLevelBelow(10)
end
cm.cost=RD.CostSendHandOrFieldToGrave(Card.IsAbleToGraveAsCost,1,1,true,nil,nil,function(g)
local c=g:GetFirst()
if c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_AQUA) then
return 1
else
return 0
end
end)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local filter=RD.Filter(cm.filter,e,tp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
if RD.ChangePosition(g,e,tp,REASON_EFFECT,POS_FACEUP_DEFENSE)~=0 and e:GetLabel()==1 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.Destroy(sg,REASON_EFFECT)
end)
end
end)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,2),RACE_ALL-RACE_AQUA,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end