Here goes...
(ipAMSAArFoc and ipAMSAArFo2 are Air Focus 1 and Air Focus 2, which are magic armor powers)
Code:
<thing id="mAMSAWvSc" name="Air wyvern scale armor" description="This grey scale armor is made from an air wyvern scales sewn over high quality light leather. It is light and comfortable.\n\nThe cost of adding Electricity Resistance or an*Air Focus to this armor is reduced by 50%.\n\nCost to make: 500 £ of scales, 50 £ other materials; Leather working*DC 24, 5 days, 50 £ retry." compset="Armor" summary="Made from an air wyvern scales sewn over high quality light leather.">
<comment>Cost reduction for Elec Resistance not coded yet</comment>
<fieldval field="gWeight" value="15"/>
<fieldval field="gSizeCost" value="1100"/>
<usesource source="SOUL"/>
<usesource source="sSOULAMS"/>
<tag group="ArmorMaxDx" tag="3"/>
<tag group="EquipType" tag="Leather"/>
<tag group="ArmorCheck" tag="3"/>
<tag group="ArmorArcFl" tag="20"/>
<tag group="ArmorClass" tag="Medium"/>
<tag group="Ability" tag="eSOULMat"/>
<tag group="HasAbility" tag="eSOULMat"/>
<tag group="ArmorAC" tag="6"/>
<tag group="Helper" tag="AlwaysMast"/>
<eval phase="First" priority="2550"><![CDATA[~ Script try no.1: This script compiles
perform gizmo.findchild[BaseItemPw,"thingid.ipAMSAArFo?"].setfocus
doneif (state.isfocus = 0)
focus.field[iPriceCash].value *= 0.5
~ Script try no.2: This script compiles
foreach pick in gizmo from BaseItemPw where "thingid.ipAMSAArFo?"
eachpick.field[iPriceCash].value *= 0.5
nexteach
~ Script try no.3: This script does not compile
~ perform container.parent.setfocus
~ doneif (state.isfocus = 0)
~ perform focus.findchild[BaseItemPw,"thingid.ipAMSAArFo?"].setfocus
~ focus.field[iPriceCash].value *= 0.5
~ Script try no.4: This script does not compile
~ perform container.parent.setfocus
~ doneif (state.isfocus = 0)
~ focus.findchild[BaseItemPw,"thingid.ipAMSAArFo?"].field[iPriceCash].value *= 0.5]]></eval>
<prereq message="This armor is already made out of a special material and a second type can not be added.">
<validate>var X2HaveMate as number
Call X2HaveMate
@valid = X2HaveMate</validate>
</prereq>
</thing>