stop
{
	trigger
	{
		!state started
	}
	start
	{
		+state started
		+state waiting
	}
}

// walking

stoplwlk
{
	trigger
	{
		state waiting
		!state dodeath
		!state doswallow
		!state dosniff
		!state doroar
		state doattk
	}
	trigger
	{
		state waiting
		!state dodeath
		!state doswallow
		!state dosniff
		!state doroar
		state dowalk
	}
	start
	{
		-state dowalk
		+state walking
		-state waiting
	}
	end
	{
		callback leftfoot
	}
	foot right_back_toes
}

lwalk
{
	trigger
	{
		!state dodeath
		!state doswallow
		!state endwalk
		!state doattk
		state walking
		-anim stoplwlk
	}
	trigger
	{
		!state dodeath
		!state doswallow
		!state endwalk
		!state doattk
		state walking
		-anim rwalk
	}
	end
	{
		callback rightfoot
	}
	foot left_back_toes
}

rwalk
{
	trigger
	{
		!state dodeath
		!state doswallow
		!state endwalk
		!state doattk
		state walking
		-anim lwalk
	}
	end
	{
		callback leftfoot
	}
	foot right_back_toes
}

lwlkstop
{
	trigger
	{
		state endwalk
		!state dodeath
		!state doattk
		state walking
		-anim stoplwlk
	}
	trigger
	{
		state dodeath
		-anim stoplwlk
	}
	trigger
	{
		state doswallow
		-anim stoplwlk
	}
	trigger
	{
		state doroar
		-anim stoplwlk
	}
	trigger
	{
		state endwalk
		!state doattk
		!state dodeath
		state walking
		-anim rwalk
	}
	trigger
	{
		state dodeath
		-anim rwalk
	}
	trigger
	{
		state doswallow
		-anim rwalk
	}
	trigger
	{
		state doroar
		-anim rwalk
	}
	end
	{
		-state walking
		-state endwalk
		+state waiting
	}
	foot left_back_toes
}

rwlkstop
{
	trigger
	{
		state endwalk
		!state doattk
		!state dodeath
		state walking
		-anim lwalk
	}
	trigger
	{
		state dodeath
		-anim lwalk
	}
	trigger
	{
		state doswallow
		-anim lwalk
	}
	trigger
	{
		state doroar
		-anim lwalk
	}
	end
	{
		-state endwalk
		-state walking
		+state waiting
	}
	foot right_back_toes
}

// charging

lwlkratk
{
	trigger
	{
		state doattk
		!state dodeath
		!state doswallow
		!state roar
		-anim rwalk
	}
	trigger
	{
		state doattk
		!state dodeath
		!state doswallow
		!state roar
		-anim stoplwlk
	}
	start
	{
		-state doattk
		-state walking
		-state endwalk
		+state attking
	}
	end
	{
		callback leftfoot
	}
	foot left_back_toes
}

rwlklatk
{
	trigger
	{
		state doattk
		!state dodeath
		!state doswallow
		!state roar
		-anim lwalk
	}
	start
	{
		-state doattk
		-state walking
		-state endwalk
		+state attking
	}
	end
	{
		callback rightfoot
	}
	foot right_back_toes
}

latk
{
	trigger
	{
		!state eating
		!state doeat
		!state endattk
		!state dodeath
		!state doswallow
		!state doroar
		-anim rwlklatk
	}
	trigger
	{
		!state eating
		!state doeat
		!state endattk
		!state dodeath
		!state doswallow
		!state doroar
		-anim ratk
	}
	end
	{
		callback rightfoot
	}
	foot left_back_toes
}

ratk
{
	trigger
	{
		!state eating
		!state doeat
		!state endattk
		!state dodeath
		!state doswallow
		!state doroar
		-anim lwlkratk
	}
	trigger
	{
		!state eating
		!state doeat
		!state endattk
		!state dodeath
		!state doswallow
		!state doroar
		-anim latk
	}
	end
	{
		callback leftfoot
	}
	foot right_back_toes
}

latkstop
{
	trigger
	{
		!state eating
		!state doeat
		state endattk
		-anim rwlklatk
	}
	trigger
	{
		!state eating
		!state doeat
		state dodeath
		-anim rwlklatk
	}
	trigger
	{
		!state eating
		!state doeat
		state doswallow
		-anim rwlklatk
	}
	trigger
	{
		!state eating
		!state doeat
		state doroar
		-anim rwlklatk
	}
	trigger
	{
		!state eating
		!state doeat
		state endattk
		-anim ratk
	}
	trigger
	{
		!state eating
		!state doeat
		state dodeath
		-anim ratk
	}
	trigger
	{
		!state eating
		!state doeat
		state doswallow
		-anim ratk
	}
	trigger
	{
		!state eating
		!state doeat
		state doroar
		-anim ratk
	}
	end
	{
		-state endattk
		-state attking
		+state waiting
	}
	foot left_back_toes
}

ratkstop
{
	trigger
	{
		!state eating
		!state doeat
		state endattk
		-anim lwlkratk
	}
	trigger
	{
		!state eating
		!state doeat
		state dodeath
		-anim lwlkratk
	}
	trigger
	{
		!state eating
		!state doeat
		state doswallow
		-anim lwlkratk
	}
	trigger
	{
		!state eating
		!state doeat
		state doroar
		-anim lwlkratk
	}
	trigger
	{
		!state eating
		!state doeat
		state endattk
		-anim latk
	}
	trigger
	{
		!state eating
		!state doeat
		state dodeath
		-anim latk
	}
	trigger
	{
		!state eating
		!state doeat
		state doswallow
		-anim latk
	}
	trigger
	{
		!state eating
		!state doeat
		state doroar
		-anim latk
	}
	end
	{
		-state endattk
		-state attking
		+state waiting
	}
	foot right_back_toes
}

roar
{
	trigger
	{
		state waiting
		!state doswallow
		!state dodeath
		state doroar
	}
	start
	{
		+state roaring
		-state doroar
		-state waiting
	}
	end
	{
		callback roar
	}
}

roar1
{
	trigger
	{
		-anim roar
	}
	end
	{
		+state waiting
		-state roaring
	}
}

sniff1
{
	trigger
	{
		state waiting
		!state doroar
		!state doswallow
		!state dodeath
		state dosniff
	}
	start
	{
		-state waiting
		-state dosniff
		+state sniffing
	}
	end
	{
		callback snort
	}
}

sniff2
{
	trigger
	{
		-anim sniff1
	}
	end
	{
		callback snort
	}
}

sniff3
{
	trigger
	{
		-anim sniff2
	}
	end
	{
		callback roar
	}
}

sniff4
{
	trigger
	{
		-anim sniff3
	}
	foot left_back_toes
}

sniff5
{
	trigger
	{
		!state eating
		!state doeat
		-anim sniff4
	}
	end
	{
		-state sniffing
		+state waiting
	}
	foot right_back_toes
}

chomp1
{
	trigger
	{
		state waiting
		!state dodeath
		state doswallow
	}
	start
	{
		-state waiting
		-state doswallow
	}
	end
	{
		callback bulge
	}
}

chomp2
{
	trigger
	{
		-anim chomp1
	}
	end
	{
		callback burp
	}
}

chomp3
{
	trigger
	{
		-anim chomp2
	}
	end
	{
		+state waiting
	}
}

shtbdy
{
	trigger
	{
		state waiting
		state dodeath
	}
	start
	{
		-state waiting
		-state dodeath
	}
	end
	{
		callback fall
	}
	foot left_back_toes
}

shtbdy2
{
	trigger
	{
		-anim shtbdy
	}
}

ddbdy
{
	trigger
	{
		-anim shtbdy2
	}
}

leat1
{
	trigger
	{
		state doeat
		-anim ratk
	}
	trigger
	{
		state doeat
		-anim rwlklatk
	}
	start
	{
		-state doeat
		-state walking
		-state attking
		+state eating
	}
	end
	{
		callback crunch
	}
	foot left_back_toes
}

leat2
{
	trigger
	{
		-anim leat1
	}
	end
	{
		callback crunch
	}
	foot left_back_toes
}

reat1
{
	trigger
	{
		state doeat
		-anim latk
	}
	trigger
	{
		state doeat
		-anim lwlkratk
	}
	trigger
	{
		state doeat
		-anim sniff4
	}
	start
	{
		-state doeat
		-state walking
		-state attking
		-state sniffing
		+state eating
	}
	end
	{
		callback crunch
	}
	foot right_back_toes
}

reat2
{
	trigger
	{
		-anim reat1
	}
	end
	{
		callback crunch
	}
	foot right_back_toes
}

eat3
{
	trigger
	{
		-anim leat2
	}
	trigger
	{
		-anim reat2
	}
	end
	{
		callback crunch
	}
	foot left_back_toes
}

eat4
{
	trigger
	{
		-anim eat3
	}
	end
	{
		callback burp
	}
	foot left_back_toes
}

eat5
{
	trigger
	{
		-anim eat4
	}
	end
	{
		-state eating
		+state waiting
	}
	foot right_back_toes
}	

norun stop
norun ddbdy