> For the complete documentation index, see [llms.txt](https://enls.gitbook.io/rgss-reference-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enls.gitbook.io/rgss-reference-manual/game-library/rpgxp-data-structures/rpg-troop-page-condition.md).

# RPG::Troop::Page::Condition

## Superclass

* [Object](/rgss-reference-manual/standard-library/built-in-classes/object.md)

## Referrer

* [RPG::Troop::Page](/rgss-reference-manual/game-library/rpgxp-data-structures/rpg-troop-page.md)

## Attributes

### turn\_valid

Truth value for whether the \[Turn] condition is valid.

### enemy\_valid

Truth value for whether the \[Enemy] condition is valid.

### actor\_valid

Truth value for whether the \[Actor] condition is valid.

### switch\_valid

Truth value for whether the \[Switch] condition is valid.

### turn\_a / turn\_b

a and b values specified in the \[Turn] condition. To be input in the form a + bx.

### enemy\_index

Troop member index specified in the \[Enemy] condition (0..7).

### enemy\_hp

HP percentage specified in the \[Enemy] condition.

### actor\_id

Actor ID specified in the \[Actor] condition.

### actor\_hp

HP percentage specified in the \[Actor] condition.

### switch\_id

Switch ID specified in the \[Switch] condition.

## Definition

```ruby
module RPG
  class Troop
    class Page
      class Condition
        def initialize
          @turn_valid = false
          @enemy_valid = false
          @actor_valid = false
          @switch_valid = false
          @turn_a = 0
          @turn_b = 0
          @enemy_index = 0
          @enemy_hp = 50
          @actor_id = 1
          @actor_hp = 50
          @switch_id = 1
        end
        attr_accessor :turn_valid
        attr_accessor :enemy_valid
        attr_accessor :actor_valid
        attr_accessor :switch_valid
        attr_accessor :turn_a
        attr_accessor :turn_b
        attr_accessor :enemy_index
        attr_accessor :enemy_hp
        attr_accessor :actor_id
        attr_accessor :actor_hp
        attr_accessor :switch_id
      end
    end
  end
end
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://enls.gitbook.io/rgss-reference-manual/game-library/rpgxp-data-structures/rpg-troop-page-condition.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
