|
Planeshift
|
A reaction embodies the change in desire which occurs in an NPC when he perceives something. More...
#include <reaction.h>
Public Member Functions | |
| void | DeepCopy (Reaction &other, BehaviorSet &behaviors) |
| bool | DoNotInterrupt (Behavior *behavior) |
| Check if this is a behavior that shouldn't be interrupted. More... | |
| csString | GetAffectedBehaviors () |
| const csString & | GetEventType () const |
| int | GetFactionDiff () |
| const csString & | GetLastTriggerd () |
| char | GetOp () |
| int | GetRandom (int i) |
| bool | GetRandomValid (int i) |
| float | GetRange () |
| const csString | GetType (NPC *npc) const |
| int | GetValue (int i) |
| csString | GetValue () |
| bool | GetValueValid (int i) |
| bool | Load (iDocumentNode *node, BehaviorSet &behaviors) |
| bool | OnlyInterrupt (Behavior *behavior) |
| Check if this is a behavior is on the only interrupt list if set. More... | |
| void | React (NPC *who, Perception *pcpt) |
| Reaction () | |
| Reaction (Reaction &other, BehaviorSet &behaviors) | |
| bool | SetValue (int i, int value) |
| Setting the value. More... | |
| bool | ShouldReact (gemNPCObject *entity) |
| Check if the player should react to this reaction. More... | |
Protected Types | |
| enum | DesireType { DESIRE_NONE, DESIRE_DELTA, DESIRE_ABSOLUTE, DESIRE_GUARANTEED } |
Protected Attributes | |
| bool | activeOnly |
| csArray< Behavior * > | affected |
| MathScript * | calcCondition |
| This is the particular calculation for condition. More... | |
| csString | condition |
| DesireType | desireType |
| Indicate the type of desire change this reaction has. More... | |
| float | desireValue |
| The value to use for the desire type. More... | |
| csArray< csString > | doNotInterrupt |
| csString | eventType |
| int | factionDiff |
| bool | inactiveOnly |
| csString | lastTriggered |
| Used for debug, show when this was last triggered. More... | |
| csArray< csString > | onlyInterrupt |
| csString | oper |
| csArray< int > | randoms |
| csArray< bool > | randomsValid |
| float | range |
| bool | reactWhenDead |
| bool | reactWhenInvincible |
| bool | reactWhenInvisible |
| csString | type |
| csArray< int > | values |
| csArray< bool > | valuesValid |
| float | weight |
| The weight to apply to deltas. More... | |
A reaction embodies the change in desire which occurs in an NPC when he perceives something.
Definition at line 51 of file reaction.h.
|
protected |
| Enumerator | |
|---|---|
| DESIRE_NONE | |
| DESIRE_DELTA | |
| DESIRE_ABSOLUTE | |
| DESIRE_GUARANTEED | |
Definition at line 79 of file reaction.h.
| Reaction::Reaction | ( | ) |
|
inline |
Definition at line 95 of file reaction.h.
| void Reaction::DeepCopy | ( | Reaction & | other, |
| BehaviorSet & | behaviors | ||
| ) |
| bool Reaction::DoNotInterrupt | ( | Behavior * | behavior | ) |
Check if this is a behavior that shouldn't be interrupted.
| behavior | The behavior to check. |
| csString Reaction::GetAffectedBehaviors | ( | ) |
| const csString& Reaction::GetEventType | ( | ) | const |
|
inline |
Definition at line 139 of file reaction.h.
|
inline |
Definition at line 157 of file reaction.h.
| char Reaction::GetOp | ( | ) |
| bool Reaction::GetRandomValid | ( | int | i | ) |
|
inline |
Definition at line 135 of file reaction.h.
| const csString Reaction::GetType | ( | NPC * | npc | ) | const |
| csString Reaction::GetValue | ( | ) |
| bool Reaction::GetValueValid | ( | int | i | ) |
| bool Reaction::Load | ( | iDocumentNode * | node, |
| BehaviorSet & | behaviors | ||
| ) |
| bool Reaction::OnlyInterrupt | ( | Behavior * | behavior | ) |
Check if this is a behavior is on the only interrupt list if set.
If there is a limitation on behaviors to interrupt for this reaction this function will return true if the behavior isn't on that list.
| behavior | The behavior to check. |
| void Reaction::React | ( | NPC * | who, |
| Perception * | pcpt | ||
| ) |
Setting the value.
This function ignore the data valid flag. And will not update it for the value set.
| bool Reaction::ShouldReact | ( | gemNPCObject * | entity | ) |
Check if the player should react to this reaction.
Caled by perception related to entitis to check for reaction against visibility and invincibility
| entity | The entity tho check for visibility and invincibility |
|
protected |
Definition at line 63 of file reaction.h.
|
protected |
Definition at line 77 of file reaction.h.
|
protected |
This is the particular calculation for condition.
Definition at line 62 of file reaction.h.
|
protected |
Definition at line 61 of file reaction.h.
|
protected |
Indicate the type of desire change this reaction has.
Definition at line 87 of file reaction.h.
|
protected |
The value to use for the desire type.
Definition at line 88 of file reaction.h.
|
protected |
Definition at line 74 of file reaction.h.
|
protected |
Definition at line 57 of file reaction.h.
|
protected |
Definition at line 59 of file reaction.h.
|
protected |
Definition at line 64 of file reaction.h.
|
protected |
Used for debug, show when this was last triggered.
Definition at line 91 of file reaction.h.
|
protected |
Definition at line 73 of file reaction.h.
|
protected |
Definition at line 60 of file reaction.h.
|
protected |
Definition at line 71 of file reaction.h.
|
protected |
Definition at line 70 of file reaction.h.
|
protected |
Definition at line 58 of file reaction.h.
|
protected |
Definition at line 65 of file reaction.h.
|
protected |
Definition at line 67 of file reaction.h.
|
protected |
Definition at line 66 of file reaction.h.
|
protected |
Definition at line 72 of file reaction.h.
|
protected |
Definition at line 69 of file reaction.h.
|
protected |
Definition at line 68 of file reaction.h.
|
protected |
The weight to apply to deltas.
Definition at line 89 of file reaction.h.