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

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

# REW: 2002-07-09
# Removed say action from proposal to reflect communications
#    infrastructure.  
# REW: 2002-09-25
# Issue the output command to play the surrender animation.  For now, that's it.

sp {retreat*propose*surrender
   (state  ^name execute-mission
              ^top-state.map.current-area.retreat-door none)
   -->
   ( ^operator  +, = 50)
   ( ^name surrender
        ^type wait
        ^actions.surrender true)
}

# once surrender - stay that way
sp {retreat*propose*surrender*always
   (state  ^name execute-mission
              ^top-state.self.surrender true)
   -->
   ( ^operator  + >, =)
   ( ^name surrender
        ^type wait)
}

sp {execute-mission*compare*surrender
   (state  ^name execute-mission
              ^operator  +
                         +)
   ( ^name surrender)
   ( ^name choose-weapon)
   -->
   ( ^operator  > )
}

# REW: 2003-01-26
# Surrender is always an option
sp {retreat*propose*surrender*nothing-else-proposed
   (state  ^name execute-mission
              ^impossible)
   -->
   ( ^operator  +, <)
   ( ^name surrender
        ^type wait
        ^actions.surrender true)
}

# REW: 2003-01-26
# Record that agent has surrendered on the state
sp {surrender*apply
   (state  ^operator.name surrender
              ^top-state )
   ( ^self  )
  -( ^surrender true)
   -->
   ( ^surrender true)
   }


# REW: 2002-07-09
# Use the communications structure for indicating surrender
# JEL had this as the communications interface:
#   ( ^target |MOUTInterface|
#          ^phrase |I give up!|)

sp {surrender*apply*broadcast-surrender
   (state  ^operator.name surrender
              ^top-state )
   ( ^self  
         ^comm )
  ( -^surrender true)
   -->
   ( ^communicate )
   ( ^name i-surrender)
   }

# REW: If I have a weapon selected, then toss it when surrendering
sp {surrender*apply*toss-selected-weapon
   (state  ^operator  
              ^top-state.self.weapons.selected-weapon.name )
   ( ^name surrender)
-->
   (write (crlf) |Tossing selected weapon to surrender: | )
   ( ^actions.toss-weapon  )
   }