; Made by Silver
;
; Regeneration script
;
@start
	IF -V20, @stop1
	SET hpnew, "#<num.hostMaxHP>"
	SET mpnew, "#<num.hostMaxMP>"

	SUB hpnew, "#<num.hostHP>"
	SUB mpnew, "#<num.hostMP>"

	SET hpnews, #<hpnew>
	SET mpnews, #<mpnew>

	SET hptime, "#<num.hostHP>"
	MUL hptime, 100
	DIV hptime,"#<num.hostMaxHP>"

	SET hptimes,"100"
	SUB hptimes,"#<hptime>"  

	COMPARE #<hpnew>, "2"
	IF< @stop1
	COMPARE #<mpnew>, "2"
	IF< @stop1

	DIV hpnew, "#<hptimes>"
	DIV mpnew, "#<hptimes>"

@compare
	COMPARE #<hpnew>, "2"
	IF< @stop1xa
	COMPARE #<mpnew>, "2"
	IF< @stop1xb

@heal
	WAIT 0.1
	HOST_GIVE H#<hpnew>
	HOST_GIVE M#<mpnew>
	COMPARE #<num.hostMaxHP> ,#<num.hostHP>  
	IF= @mp
@mp
	COMPARE #<num.hostMaxMP> ,#<num.hostMP>
	IF= @hp
	GOTO @heal
@hp
	COMPARE #<num.hostMaxHP> ,#<num.hostHP>  
	IF= @end
	GOTO @heal
@stop1xa
	ADD hpnew, "1"
	GOTO @compare
@stop1xb
	ADD mpnew, "1"
	GOTO @compare
@end
;	DIV hptimes, "2"
;	N: You healed #<hpnew> HP and #<mpnew> MP every second for #<hptimes> seconds.
	END
