[h: Name = "Melee Basic Attack"] <!-- Name (shown in the Frame) -->
[h: PowerType = "AtWill"] <!-- AtWill, Encounter, Daily, Utility (shown in the Frame)-->
[h: Action = "Standard"] <!-- Action Type (shown in the Frame)-->
[h: KeyWords = "Weapon"] <!-- Keywords (shown in the Frame) -->
[h: Desc = "+3 to damage rolls if the attack is granted by aegis of assault"]
[h: Range = "One Creature"] <!-- Range (shown in the Frame) -->
[h: AttackRoll = 1d20]
[h: AttackBonus = 8] <!-- Attack Bonus -->
[h: CritOn = 20] <!-- Is ist a critical Hit? -->
[h: Defense = "AC"] <!-- Defense -->
[h: DamageDiceNumber = 1]
[h: DamageDiceSides = 10]
[h: DamageBonus = StrBonus] <!-- set in Token-->
[h: DamageType = "Physical"] <!-- Damage Type -->
<!-- Set the color of the frame based on the PowerType -->
[h: FrameColor = "Gray"]
[h,if (PowerType == "AtWill"),code:
{
[h: FrameColor = "Green"]
}]
[h,if (PowerType == "Encounter"),code:
{
[h: FrameColor = "Red"]
}]
[h,if (PowerType == "Daily"),code:
{
[h: FrameColor = "Black"]
}]
[h,if (PowerType == "Utility"),code:
{
[h: FrameColor = "Blue"]
}]
<!-- Write the power's output in an html table -->
<table style="width:100%;">
<!-- Display the frame with the power name -->
<tr style="background-color:[r: FrameColor]">
<span style="color:white"><b>[r: Name]</b> • Action: [r: Action] • Range: [r: Range]
<span style="color:white">Keywords: [r: KeyWords]
</tr>
<!-- Display the description -->
<tr>
<td>[r: Desc]</td>
</tr>
<!-- Display the attack roll -->
<tr>
<td>
<b>Attack = [r: AttackRoll + AttackBonus] vs. [r: Defense]</b>
(1d20 + Bonus = [r: AttackRoll] + [r: AttackBonus])
</td>
</tr>
<!-- Display the standard Hit damage roll -->
[r, if(AttackRoll < 20 && AttackRoll > 1), code:
{
[h: DamageRoll = eval(DamageDiceNumber+"d"+ DamageDiceSides)]
<tr>
<td>
<b>Damage = [r: DamageRoll+DamageBonus] vs. [r: Defense]</b>
([r: DamageDiceNumber]d[r: DamageDiceSides] + Bonus = [r: DamageRoll] + [r: DamageBonus])
</td>
</tr>
};
{
<!-- Display the critical Hit damage roll -->
[if(AttackRoll == 20), code:
{
<tr>
<td>
A Critical Hit! The Target receives max weapon damage <tr>
<b>Damage = [r: DamageDiceSides+DamageBonus] vs. [r: Defense]</b>
(Max Weapon Damage + Bonus = [r: DamageDiceSides] + [r: DamageBonus])
</td>
</tr>
};
{
I loose the Hit! The Target receives no damage
}]
}]
</table>