All Downloads are FREE. Search and download functionalities are using the official Maven repository.

APT.all-test.MOUTBot.execute-mission.choose-weapon.soar Maven / Gradle / Ivy


## Select a grenade if a threat is not visible and
## not in the current room and there is no visible threat
## Should check distance, but doesn't

sp {execute-mission*propose*choose-weapon*grenade
   (state  ^name execute-mission
              ^top-state )
   ( ^parameters 

-^mission.objective.defensive-position.threat-door-range < 200 -^self.posture at-ease -^self.threw-grenade.active true ^self.weapons ^threats.threat -^threats.threat.entity.visible true ^map.current-area.name <> ) (

^min-grenade-range ^max-grenade-range ) ( ^area-name ^entity.visible false) ( ^selected-weapon ^weapon ) ( ^type <> grenade) ( ^type grenade ^rounds-available true ^class ) --> (write (crlf) |Proposing operator choose-weapon grenade: M_67... |) ( ^operator +, = 10) ( ^name choose-weapon ^weapon ^actions.choose-weapon ) } sp {execute-mission*propose*choose-weapon*gun (state ^name execute-mission ^top-state ) ( ^self.weapons ^threats.threat.entity.visible true) ( ^selected-weapon.type grenade ^weapon ) ( ^type <> grenade ^class ^rounds-available true) --> (write (crlf) |Proposing operator choose-weapon | |... |) ( ^operator +, = 90) ( ^name choose-weapon ^weapon ^actions.choose-weapon ) } ## Switch back to gun after throw grenade sp {execute-mission*propose*choose-weapon*gun*grenade (state ^name execute-mission ^top-state ) ( ^self ) ( ^weapons ^hiding ^threw-grenade ) ( ^selected-weapon.type grenade ^weapon ) ( ^type <> grenade ^class ^rounds-available true) --> (write (crlf) |Proposing operator choose-weapon | |... |) ( ^operator +, = 70) ( ^name choose-weapon ^weapon ^actions.choose-weapon ) } sp {execute-mission*propose*choose-weapon*change-no-enemy (state ^name execute-mission ^top-state ) ( ^self.weapons -^threats.threat.entity.visible true) ( -^selected-weapon.rounds-available true ^weapon ) ( ^class ^rounds-available true) --> (write (crlf) |Proposing operator choose-weapon | |... |) ( ^operator +, = 80) ( ^name choose-weapon ^weapon ^reason empty ^actions.choose-weapon ) } sp {execute-mission*propose*choose-weapon*change-no-ammo (state ^name execute-mission ^top-state ) ( ^self.weapons ^threats.threat.entity.visible true) ( -^selected-weapon.rounds-available true ^weapon ) ( ^class ^rounds-available true) --> (write (crlf) |Proposing operator choose-weapon | |... |) ( ^operator +, = 50) ( ^name choose-weapon ^reason empty ^weapon ^actions.choose-weapon ) } sp {execute-mission*propose*choose-weapon*reload-error (state ^name execute-mission ^io.input-link.agent ^io.output-link.reload.error-code ) ( ^weapon.selected yes ^weapon ) ( -^selected yes ^ammo-amount > 0 ^class ^name ) --> (write (crlf) |Proposing operator choose-weapon reload error.. | |weapon | | | | | ) ( ^operator +, = 80) ( ^name choose-weapon ^weapon ^reason reload ^actions.choose-weapon ) } # REW: 2003-01-24 # drop handgun out of this, address in a variability production sp {execute-mission*compare*choose-weapon*guns-better-than-knife (state ^name execute-mission ^operator + +) ( ^name choose-weapon ^weapon.type << assault-rifle handgun >>) ( ^name choose-weapon ^weapon.type knife) --> ( ^operator > ) } # REW: 2003-01-24 # Add this production to make handgun less likely than rifle, but possible sp {execute-mission*compare*choose-weapon*handgun-not-a-great-choice (state ^name execute-mission ^operator + +) ( ^name choose-weapon ^weapon.type assault-rifle) ( ^name choose-weapon ^weapon.type handgun) --> ( ^operator = 0) }