I am working on a set of rules that will run if certain conditions are met. As it is written here I am testing with unarmed weapons but the problem exists whether the weapon is armed, unarmed or not in the player’s possession. The “FRIEND” rule works fine but the “ENEMY” rule returns a “can’t see any such thing” message at the end.
[spoiler][code]enemyfighting is a kind of value. The enemyfightings are attack Balak Guard, attack some Balak Guard, fight Balak Guard, fight some Balak Guard, attack enemy, attack enemy person, fight enemy, fight enemy person.
friendfighting is a kind of value. The friendfightings are attack Vulnetas, attack some Vulnetas, fight Vulnetas, fight some Vulnetas, attack friend, attack neutral person, fight neutral, fight neutral person, attack Nderim Drore, fight Nderim Drore, attack Nderim, fight Nderim.
After reading a command:
if the player’s command includes “[enemyfighting]”:
now the reiver blade is unarmed;
now the flag in row three of the Table of Target Flags is 1;
follow the attack enemy with no weapon rule;
if the player’s command includes “[friendfighting]”:
now the reiver blade is unarmed;
now the flag in row four of the Table of Target Flags is 1;
follow the attack friendly with no weapon rule.
This is the attack enemy with no weapon rule:
if the flag in row three of the Table of Target Flags is 1:
if an enemy is in location:
if the player has a weapon:
if the reiver blade is armed:
say “[line break]You are armed with a reiver blade which is not designed for ranged attacks, you risk losing the weapon while causing little or no damage to your foe. Do you wish to continue the action?[paragraph break][link]ABSOLUTELY[end link][line break][link]MAYBE NOT[end link]”;
now the flag in row one of the Table of Yes No Tracking is 1;
now the flag in row three of the Table of Target Flags is 0;
if the cold hammered iron dagger is armed:
say “[line break]You carry a pair of cold hammered iron daggers originally designed for close quarters combat. The daggers can be useful as ranged weapons over short distances though the downside to this attack is the loss of the weapon until it can be retrieved from the ground or from the corpse of your foe. Do you wish to continue the action?[paragraph break][link]ABSOLUTELY[end link][line break][link]MAYBE NOT[end link]”;
now the flag in row two of the Table of Yes No Tracking is 1;
now the flag in row three of the Table of Target Flags is 0;
if no weapon is armed:
say “[line break]Your weapon is not armed.”;
now the flag in row three of the Table of Target Flags is 0;
now player is in location;
otherwise:
say “[line break]You do not possess a weapon with which to attack anyone.”;
now the flag in row three of the Table of Target Flags is 0;
now player is in location;
otherwise:
if the player has a weapon:
if the reiver blade is armed:
place Balak Guard in scope;[AS ENEMIES ARE CREATED THEY SHOULD BE ADDED TO THIS LIST]
say “[line break]No enemy is present in your current location, surely you do not wish to attack the good folk of [location].[paragraph break][link]SURELY[end link][line break][link]SURELY NOT[end link][line break]”;
now the flag in row one of the Table of Target Flags is 1;
now the flag in row three of the Table of Target Flags is 0;
if the cold hammered iron dagger is armed:
place Balak Guard in scope;[AS ENEMIES ARE CREATED THEY SHOULD BE ADDED TO THIS LIST]
say “[line break]No enemy is present in your current location, surely you do not wish to attack the good folk of [location].[paragraph break][link]SURELY[end link][line break][link]SURELY NOT[end link][line break]”;
now the flag in row one of the Table of Target Flags is 1;
now the flag in row three of the Table of Target Flags is 0;
if no weapon is armed:
place Balak Guard in scope;[AS ENEMIES ARE CREATED THEY SHOULD BE ADDED TO THIS LIST]
say “[line break]Your weapon is not armed.”;
now the flag in row three of the Table of Target Flags is 0;
now player is in location;
otherwise:
place Balak Guard in scope;[AS ENEMIES ARE CREATED THEY SHOULD BE ADDED TO THIS LIST]
say “[line break]You do not possess a weapon with which to attack anyone.”;
now the flag in row three of the Table of Target Flags is 0;
now player is in location.
This is the attack friendly with no weapon rule:
if the flag in row four of the Table of Target Flags is 1:
if a neutral person is in location:
if the player has a weapon:
if the reiver blade is armed:
say “[line break]No one in your current location represents a threat to you. Do you really intend to harm the good folk of [location]?[paragraph break][link]SURELY[end link][line break][link]SURELY NOT[end link][line break]”;
now the flag in row one of the Table of Target Flags is 1;
now the flag in row four of the Table of Target Flags is 0;
if the cold hammered iron dagger is armed:
say “[line break]No one in your current location represents a threat to you. Do you really intend to harm the good folk of [location]?[paragraph break][link]SURELY[end link][line break][link]SURELY NOT[end link][line break]”;
now the flag in row one of the Table of Target Flags is 1;
now the flag in row four of the Table of Target Flags is 0;
if no weapon is armed:
say “[line break]Your weapon is not armed.”;
now the flag in row four of the Table of Target Flags is 0;
now player is in location;
otherwise:
say “[line break]You do not possess a weapon with which to attack anyone.”;
now the flag in row four of the Table of Target Flags is 0;
now player is in location;
otherwise:
if the player has a weapon:
if the reiver blade is armed:
place Nderim Drore in scope;[AS NEUTRALS ARE CREATED THEY SHOULD BE ADDED TO THIS LIST]
say “[line break]You should learn to relax a bit, there is no one here.”;
now the flag in row four of the Table of Target Flags is 0;
now player is in location;
if the cold hammered iron dagger is armed:
place Nderim Drore in scope;[AS NEUTRALS ARE CREATED THEY SHOULD BE ADDED TO THIS LIST]
say “[line break]You should learn to relax a bit, there is no one here.”;
now the flag in row four of the Table of Target Flags is 0;
now player is in location;
if no weapon is armed:
place Nderim Drore in scope;
say “[line break]Your weapon is not armed.”;
now the flag in row four of the Table of Target Flags is 0;
now player is in location;
otherwise:
place Nderim Drore in scope;
say “[line break]You do not possess a weapon with which to attack anyone.”;
now the flag in row four of the Table of Target Flags is 0;
now player is in location.[/code][/spoiler]
These are the last set of rules listed when running the enemy rule
[Rule "other people looking rule" applies.]
[Rule "last specific action-processing rule" applies.]
[Rule "After deciding the scope of the player" applies.]
[Rule "After deciding the scope of the player" applies.]
[Rule "After deciding the scope of the player" applies.]
[Rule "After deciding the scope of the player" applies.]
[Rule "After deciding the scope of the player" applies.]
[Rule "After deciding the scope of the player" applies.]
[Rule "After deciding the scope of the player" applies.]
[Rule "new can't see any such thing rule" applies.]
You can't see any such thing.
and the friend rule
[Rule "report stage rule" applies.]
[Rule "last specific action-processing rule" applies.]
[Rule "A first turn sequence rule" applies.]
[Rule "every turn stage rule" applies.]
[Rule "carry out patrolling rule" applies.]
[Rule "fighting back rule" applies.]
[Rule "Every turn" applies.]
[Rule "Every turn" applies.]
[Rule "Every turn" applies.]
[Rule "Every turn" applies.]
There is quite a bit of code written to accommodate various conditions with the weapons and how the player actually enters combat mode but I cannot find a single situation anywhere that tells me what the darn thing is looking for that it cannot see. I don’t know if this is enough info to help but I can post more later. I have searched every way I know until now I am just running in circles with debug and trying to write rules to override the issue. Help.