The game I'm working on focuses fairly heavily on survival... and, as such, you need to camp fairly regularly to restore your stamina (tp). I have food, trap, and bait items made but I'm trying to figure out exactly how to implement this.
Food needs to check the mapID (I have a variable set up to do this) and then set you into a "camping mode". I'd kind of like to have little camping spots set up in each map so that you can camp in a place. Not 100% sure exactly how I want to go about that though. I think I want to have a switch (canCamp) you turn on when you enter an area and off when you leave, with a small message letting you know the first time you enter it... and then camping mode puts your group around an actual camp fire and lets you talk with them.
Also, each PC in the game has a fixed class aside from the main character, which can choose any one.
This was said so that the next part made more sense.
When I use a snare or lure, I want them to turn on a switch which, upon camping, triggers a combat event after the camping is done. That part I think I can manage. What I can't figure out is how to add the effects of the lure to the enemies when the battle starts.
Example: I have different types of poisoned meat. If you use it and then camp, you get a chance for a random battle with anything that you could normally encounter in that area. However, enemies lured in by bait need to have a higher chance of ambush (having a rogue or assassin (or having the main character be one of those classes) grants a cumulative chance of ambush while having a ranger (or having the main character being a ranger) grants a cumulatively increased chance for there to be a "rare" battle).
So, how would I add the poisoned state to the enemies lured by the poisoned meat and ensure the appropriate chance of ambush based on which characters are in the party (it starts at 25% with no one being a rogue or assassin and increases by 25% for each one present (for a total of 100% with 3))?
I've got the encounter chance at least partially figured out, I think. It's mostly with the ambush and state effects that I need help.
Food needs to check the mapID (I have a variable set up to do this) and then set you into a "camping mode". I'd kind of like to have little camping spots set up in each map so that you can camp in a place. Not 100% sure exactly how I want to go about that though. I think I want to have a switch (canCamp) you turn on when you enter an area and off when you leave, with a small message letting you know the first time you enter it... and then camping mode puts your group around an actual camp fire and lets you talk with them.
Also, each PC in the game has a fixed class aside from the main character, which can choose any one.
This was said so that the next part made more sense.
When I use a snare or lure, I want them to turn on a switch which, upon camping, triggers a combat event after the camping is done. That part I think I can manage. What I can't figure out is how to add the effects of the lure to the enemies when the battle starts.
Example: I have different types of poisoned meat. If you use it and then camp, you get a chance for a random battle with anything that you could normally encounter in that area. However, enemies lured in by bait need to have a higher chance of ambush (having a rogue or assassin (or having the main character be one of those classes) grants a cumulative chance of ambush while having a ranger (or having the main character being a ranger) grants a cumulatively increased chance for there to be a "rare" battle).
So, how would I add the poisoned state to the enemies lured by the poisoned meat and ensure the appropriate chance of ambush based on which characters are in the party (it starts at 25% with no one being a rogue or assassin and increases by 25% for each one present (for a total of 100% with 3))?
I've got the encounter chance at least partially figured out, I think. It's mostly with the ambush and state effects that I need help.