Hello all, I have this procedure:
\procedure adjusted-fp-cost(character, spell)
<$let spellbook={{{ [<character>get[spellbook]] }}} advbook={{{ [<character>get[advbook]] }}} IQcp={{{ [<character>get[IQ-cp]] }}}>
<$wikify name="baseskill" text="<$macrocall $name='spell-base-skill' spellbook=<<spellbook>> spellitem=<<spell>> advbook=<<advbook>> IQcp=<<IQcp>> />">
<% if [<spellbook>has:index<spell>] %>
<% if [<spell>!match[Reflex]] +[<spell>get[class]!match[Blocking]] %>
<% if [<baseskill>compare::gt[14]compare::lt[20]] %>
<$macrocall $name="cost-fp" value={{{ [<spell>get[base_cost]subtract[1]max[0]] }}}/> (adj. from <$macrocall $name="cost-fp" value={{{ [<spell>get[base_cost]] }}}/>)
<% elseif [<baseskill>compare::gt[19]compare::lt[25]] %>
<$macrocall $name="cost-fp" value={{{ [<spell>get[base_cost]subtract[2]max[0]] }}}/> (adj. from <$macrocall $name="cost-fp" value={{{ [<spell>get[base_cost]] }}}/>)
<% elseif [<baseskill>compare::gt[24]compare::lt[30]] %>
<$macrocall $name="cost-fp" value={{{ [<spell>get[base_cost]subtract[3]max[0]] }}}/> (adj. from <$macrocall $name="cost-fp" value={{{ [<spell>get[base_cost]] }}}/>)
<% elseif [<baseskill>compare::gt[29]] %><$let baseskillexcedent={{{ [<baseskill>subtract[25]divide[5]trunc[]] }}}> (adj. from <$macrocall $name="cost-fp" value={{{ [<spell>get[base_cost]] }}}/>)
<$macrocall $name="cost-fp" value={{{ [<spell>get[base_cost]subtract[3]subtract<baseskillexcedent>max[0]] }}}/></$let> (adj. from <$macrocall $name="cost-fp" value={{{ [<spell>get[base_cost]] }}}/>)
<% else %>
<$macrocall $name="cost-fp" value={{{ [<spell>get[base_cost]] }}}/>
<% endif %>
<% else %><$macrocall $name="cost-fp" value={{{ [<spell>get[base_cost]] }}}/>
<% endif %>
<% else %>
Spell not in <<character>>'s Spellbook.
<% endif %>
</$wikify></$let>
\end
The second conditional <% if [<spell>!match[Reflex]] +[<spell>get[class]!match[Blocking]] %>
holds two runs to exclude the tiddler “Reflex”, as well as any <spell>
whose field class
is “Blocking”. The second run works fine, but the first one (the simplest, actually), doesn’t.
It does work when I remove the second run; so I’m assuming one cannot formulate a single conditional with two runs to check; am I correct?