DisplayAttack


<!—

[varsFromStrProp(macro.args)]

[Status = Input(
"JunkVar | “+PowerName+” | Selected Power | LABEL",
“NTargets | 1 | Number of Attacks”,
“CA | 0 | Combat Advantage | CHECK”,
“AttMod | 0 | Attack Modifier”,
“DmgMod | 0 | Damage Modifier”)]
[abort(Status)]

[CombAdv = If(CA==1, 2, 0)]
[CritHit = 0]

[AttBonus = eval(AttBonus)]
[DmgBonus = eval(DmgBonus)]
[CritDmgBonus = eval(CritDmgBonus)]
[DmgRoll = eval(DmgRoll)]

[AttBGColor = “bgcolor=‘#FFFF99’”]
[AttFontColor = “<font color=‘#000033’>”]
[DmgFontColor = “<font color=‘#660000’>”]
[CritFontColor = “<font size=3 color=‘#FF0000’>”]

—>

[COUNT(NTargets,""),CODE:
{
[h: AttRoll = 1d20]
[h: CritHit = If(AttRoll>=Crit, 1, CritHit)]

<table border=‘0’ cellpadding=‘1’ cellspacing=‘0’ width=‘100%’ {AttBGColor}>
{AttFontColor}
<tr>
<td valign=middle>
<font size=3><b> Attack {roll.count+1} </b><br>
<font size=2> ( {AttRoll} + {AttBonus} )
</td>
{If(AttRoll>=Crit, “<td align=center valign=middle>”+CritFontColor+“<b> Critical Hit! </b></td>”,"")}
{If(AttRoll==1, “<td align=center valign=middle>”+CritFontColor+“<b> Failure. </b></td>”,"")}
<td align=right valign=middle>
{If(AttRoll==1, “<s>”,"")}
<b><font size=5>{AttRoll+AttBonus}</s>
<b><font size=2> vs</font>
<font size=4> {DefType} </b>
</td>
</tr>
</font>
</table>
}]

[COUNT(CritHit,""),CODE:
{
<table border=‘0’ cellpadding=‘1’ cellspacing=‘0’ width=‘100%’ {AttBGColor}>
{CritFontColor}
<tr>
<td valign=middle>
<font size=3><b> Crit Damage <br></b>
<font size=2> ( {CritDmgRoll} + {CritDmgBonus} )
</td>
<td align=right valign=middle>
<b><font size=5> {CritDmgRoll + CritDmgBonus}
<font size=4> {DmgType} </b>
</td>
</tr>
</font>
</table>
}]

<table border=‘0’ cellpadding=‘1’ cellspacing=‘0’ width=‘100%’ {AttBGColor}>
{DmgFontColor}
<tr>
<td valign=middle>
<font size=3><b>{If(CritHit==1, “Normal”, "")} Damage <br></b>
<font size=2> ( {DmgRoll} + {DmgBonus} )
</td>
<td align=right valign=middle>
<b><font size=5> {DmgRoll + DmgBonus}
<font size=4> {DmgType} </b>
</td>
</tr>
</font>
</table>


Return to Sample MapTool Macros

DisplayAttack

Nieda-Harsas Bureau of Tourism solarbiscuit