Skip to content

RushDuel.IsCanChangeDef ​

Alias: RD.IsCanChangeDef. Requires the matching Rush Duel Lua bootstrap.

Signature ​

lua
RushDuel.IsCanChangeDef(any card) -> any

Description ​

Rush Duel helper declared in RDCondition.lua. Its argument names are extracted from the pinned source; parameter and return types have not yet been reviewed.

Upstream source comment ​

text
条件: 可否改变守备力

Parameters ​

  • card any: Type and behavior are not yet reviewed; see the source.

Returns ​

  • any: Return contract has not been reviewed; inspect the source below.

Source ​

Rush/Utilities/RDCondition.lua:107

lua
function RushDuel.IsCanChangeDef(card)
    return card:IsDefenseAbove(0) and not RushDuel.IsMaximumMode(card)
end

Used By ​

Generated from the local Rush/Scripts/ folder and rush_cards.cdb.

  • Detected in 6 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.IsCanChangeDef.
CardIDScriptDetected Calls
Lightning Braver120213018Rush/Scripts/c120213018.lua1
Painful Choice120109062Rush/Scripts/c120109062.lua1
Sword & Shield120155052Rush/Scripts/c120155052.lua4
Smashing Ground120203017Rush/Scripts/c120203017.lua1
Fire Golem120120019Rush/Scripts/c120120019.lua1
Shield & Sword120140009Rush/Scripts/c120140009.lua1

Script Examples ​

Lightning Braver (120213018) ​

Source: Rush/Scripts/c120213018.lua

lua
end
function cm.downfilter(c)
	return c:IsFaceup() and RD.IsCanChangeDef(c)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,3,3)

Painful Choice (120109062) ​

Source: Rush/Scripts/c120109062.lua

lua
--Activate
function cm.filter(c)
	return c:IsFaceup() and RD.IsCanChangeDef(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)

Sword & Shield (120155052) ​

Source: Rush/Scripts/c120155052.lua

lua
	local tc=Duel.GetAttacker()
	local bc=Duel.GetAttackTarget()
	return tc:IsControler(1-tp) and tc:IsLevelBelow(9) and RD.IsCanChangeDef(tc)
		and bc and bc:IsAttackPos() and RD.IsCanChangeDef(bc)
end