Skip to content

RushDuel.CanDamage ​

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

Signature ​

lua
RushDuel.CanDamage(any desc, any player, any damage, any break_effect) -> any

Description ​

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

Upstream source comment ​

text
可选操作: 伤害

Parameters ​

  • desc any: Type and behavior are not yet reviewed; see the source.
  • player any: Type and behavior are not yet reviewed; see the source.
  • damage any: Type and behavior are not yet reviewed; see the source.
  • break_effect 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/RDAction.lua:616

lua
function RushDuel.CanDamage(desc, player, damage, break_effect)
    if damage > 0 and Duel.SelectYesNo(player, desc) then
        if break_effect then
            Duel.BreakEffect()
        end
        return Duel.Damage(1 - player, damage, REASON_EFFECT)
    end
    return 0
end

Used By ​

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

  • Detected in 13 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.CanDamage.
CardIDScriptDetected Calls
Madrhea Amelo120300028Rush/Scripts/c120300028.lua1
Voidvelg Divine Requiem120109037Rush/Scripts/c120109037.lua1
Necromaid Lurker120294044Rush/Scripts/c120294044.lua1
Mythical Chimera Snake120286006Rush/Scripts/c120286006.lua1
Galactica Oblivion Ark120277008Rush/Scripts/c120277008.lua1
Wicked Fire Blast of Zera120287013Rush/Scripts/c120287013.lua1
Requiem Strike Back120277060Rush/Scripts/c120277060.lua1
Micronova120300044Rush/Scripts/c120300044.lua1
Attract Golem120271026Rush/Scripts/c120271026.lua1
Giant Dynamix Impact120274049Rush/Scripts/c120274049.lua1
Tamabot Boost Dragon120285038Rush/Scripts/c120285038.lua1
Dentacle the Parasitic Extraterrestrial120264035Rush/Scripts/c120264035.lua1
Summoning Sorcerer Doretheo120244032Rush/Scripts/c120244032.lua1

Script Examples ​

Madrhea Amelo (120300028) ​

Source: Rush/Scripts/c120300028.lua

lua
	RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
		if Duel.Destroy(g,REASON_EFFECT)~=0 and g:IsExists(cm.exfilter,1,nil) then
			RD.CanDamage(aux.Stringid(m,1),tp,600)
		end
	end)

Voidvelg Divine Requiem (120109037) ​

Source: Rush/Scripts/c120109037.lua

lua
		local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
		local dam=g:GetSum(Card.GetAttack)
		RD.CanDamage(aux.Stringid(m,2),tp,dam,true)
	end
end

Necromaid Lurker (120294044) ​

Source: Rush/Scripts/c120294044.lua

lua
	RD.SelectAndDoAction(HINTMSG_DESTROY,nil,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
		if Duel.Destroy(g,REASON_EFFECT)~=0 then
			RD.CanDamage(aux.Stringid(m,1),tp,700,true)
		end
	end)