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

APT.all-test.MOUTBot.execute-mission.sentry-watch.ignore-non-visible-threats.soar Maven / Gradle / Ivy

##################################### 
# file: ignore-non-visible-threats.soar 
# created: REW: 2001-08-26
## 
# Delete threats that are no longer visible
#
# Change history: 
# 
#  [1] 

echo "\nLoading execute-mission/defend/sentry-watch/ignore-non-visible-threats.soar"
                
# record-threat copies over the id from the input link, so really any negated test would 
# work here...
sp {sentry-watch*propose*ignore-non-visible-threats
   (state  ^name sentry-watch
              ^objective.sentry-watch.threats )
   ( ^reported-threat )
   ( -^visible true)
   -->
   ( ^operator  + =)
   ( ^name ignore-non-visible-threats
        ^threat )
}


sp {apply*ignore-non-visible-threats*decrement-count
   (state  ^operator 
              ^objective.sentry-watch.threats )
   ( ^name ignore-non-visible-threats
              )
   ( ^total-threats { > 0  })
   -->
   ( ^total-threats  - (-  1) + )
}


sp {apply*ignore-non-visible-threats*delete*reported-threat
   (state  ^operator 
              ^objective.sentry-watch.threats )
   ( ^name ignore-non-visible-threats
         ^threat )
   ( ^reported-threat )
   -->
   ( ^reported-threat  - )
}

### SEARCH CONTROL

# If there are threats that should be deleted, delete them before making a report

sp {sentry-watch*compare*ignore-non-visible-threats
   (state  ^name sentry-watch
              ^operator  +
                         +)
   ( ^name ignore-non-visible-threats)
   ( ^name report-threats)
   -->
   ( ^operator  > )
}