as Marzipan has stated already (to just further comment of my own):
yes, this is done through Attributes and the 'if' Script, a brief simple quick example:
(I used the special 'changed' Script Attribute too)
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="sample">
<gameid>b073bbfb-0e99-45d3-9786-bb395a6bc6b0</gameid>
<firstpublished>2016</firstpublished>
<author>HegemonKhan</author>
<version>1.0</version>
</game>
<object name="room">
<object name="player">
<attr name="alignment_integer" type="int">50</attr>
<attr name="alignment_string" type="string">neutral</attr>
<attr name="changedalignment_integer" type="script"><![CDATA[
if player.alignment_integer > 100) {
player.alignment_integer = 100
} else if (player.alignment_integer < 0) {
player.alignment_integer = 0
}
if (player.alignment_string <> "good" and player.alignment_integer > 66) {
player.alignment_string = "good"
} else if (player.alignment_string <> "neutral" and player.alignment_integer > 33) {
player.alignment_string = "neutral"
} else if (player.alignment_string <> "evil") {
player.alignment_string = "evil"
}
]]></attr>
</object>
<object name="npc">
<attr name="kill" type="script">
player.alignment_integer = player.alignment_integer - 5
</attr>
<attr name="kiss" type="script">
player.alignment_integer = player.alignment_integer + 5
</attr>
<attr name="displayverbs" type="simplestringlist">kill;kiss</attr>
</object>
</object>
<verb>
<property>kill</property>
<pattern>kill</pattern>
<defaultexpression>You can't kill that.</defaultexpression>
</verb>
<verb>
<property>kiss</property>
<pattern>kiss</pattern>
<defaultexpression>You can't kiss that.</defaultexpression>
</verb>
</asl>