I have added to the github repository for Svarog a new test, test5. It is activated by running "make test5" in the examples folder. It is based on the Svarog specification examples/example3_dorban.svarog .
When you run the test5 it is good to have an assistance of multiple svarog daemons. The client should have a configuration file /home/$USER/.svarog/svarog.ini in place.
The specification contains three hidden variables and five localizations. The localizations are connected as follows:
The input variables are:
- has_dorban_won_a_fight (normally none, after attacking a vampire true or false)
- where_is_dorban - one of the places
- can_dorban_see_pregor - true or false
- can_dorban_see_pregor_is_alive - normally none, if dorban can see pregor either true or false
- can_dorban_see_vampire - true or false
- is_pregor_following_dorban - true or false
In test5 Dorban immediately meets Pregor in Krakow (alive), asks him to join him, then they go together to Warszawa, do not find vampire here, then they go to Poznan and meet the vampire. The first attack is succesfull, but the second one fails and Pregor (still alive) is not accompanying Dorban any more. Then Dorban asks Pregor to accompany him, Pregor accepts, they both attack the vampire and the attack fails. Pregor dies. When Dorban sees that Pregor is dead he knows he would not ever become living any more, and Dorban decides to attack the vampire on his own.
The svarog with all the examples can be downloaded from https://github.com/pawelbiernacki/svarog.