---
My Cocoon State...is composed of many states. You may need Conditional States, and here are a few rules:
1. You can't assign nil or zero as there is no state for that.
2. States you assign with this script cannot trigger the condition of another state.
3. The basis of the Conditional State script is that it outputs one number
So the first version of my Cocooned State was Cocooned, and the second version includes a Webbed state; a person needs to be webbed before they could be cocooned via the same skill, so my notebox has this:
if a.state?(WEBBED)
COCOONED
else
WEBBED
end
Though now that I think about it, the player could Web a Cocooned player, so you might want to have:
If a.state(COCOONED)
COCOONED
else
if a.state?(WEBBED)
COCOONED
else
WEBBED
end
end
Now, what I have for version X is a bit more complicated, but it works. This is what the general code looks like: If the target is COCOONED, maintain the current cocoon state; else if the target has two other parts of the body WEBBED (or PARTS doesn't need webbing like a snake) and the target is not IMMUNED to cocooning, then apply a cocoon based on their SIZE (predetermined by a state) and remove the other two states; else if the target doesn't have a missing-body state, apply the state. This WEBBED state is also copied to the other two WEBBED states. I had to decide if I wanted cocooning or body parts first, but I figured if a target is cocooned, then there's not really a point to reinforced certain body parts, so those web skills will affect a cocoon equally. Anyway, these are some (not all) of the states I used for version X to give you an idea:
Active States: States to be applied after processing.
NORMAL COCOON- This is the state you're aiming for.
SMALL COCOON
HEAD WEBBED- These states hold the conditional states.
BODY WEBBED
"Passive" States: States to check and determine results.
NO COCOON- For enemies that can be Webbed but not Cocooned (ie a spider).
SMALL- Size modifier for Cocoon.
NO HEAD- Immune to the Webbed state for that part, but also means one less requirement for cocooning.
NO BODY
---
Next, the cocoons themselves. Using the same author, I went with Shape Shift to change the graphics and skills of the battler through a state; this requires setting up the Actor or Enemy depending on who is targeted. I went a bit further with State Charges and a modified Confusion Fix to automatically use skills (requires setting confusion). Anyway, once you have COCOONED inflicted, don't forget to set some freedom methods for a challenge; Skills that remove the state, damage change, etc.
Also, I tested this for enemies but should probably see how actors work, but some enemies may possess skills like Cut to help free them. So I created two more states: KNIFE and NO KNIFE, and also a skill type called Blade with a removal spell inside it. With how the Shape Shift script works, you want to give the specific enemy KNIFE and the cocoon in general the removal spell (requiring KNIFE state). This means that KNIFE enemies can use that skill to escape while cocooned while normal enemies use the other skills. However, NO KNIFE will be set to seal the Fire skill type, which also includes that certain skill, so an enemy infected with NO KNIFE cannot use that KNIFE escape skill. I will see if I can find a simpler method.
And I used State Charges as I did not want a simple escape spell to undo your cocoon. Keep in mind that you cannot refresh the State Charges by applying the same state, but there are methods in the script to refresh or add to the states.
---
Oh, and I have a few snippets:
1. Placing $game_variables[x] = y; dmg in a skill's formula and calling a Common Event. I used this to have dialogue depending on the skill, but I'm not sure if I need this for the demo.
2. If one of my "party members" gets uncocooned, they're likely to escape from the party. So at the end of each turn in battle, I run a Common Event, and the Common Event will check if the party member has that state...if not, then the member is removed from the party after a few parting words. Since I'm looking forward to Cloning Actors, though, I'm not sure if this method works...unless I use a Loop?
3. I want to carry cocoons on the field but want to suffer a speed penalty the more cocoons I have. In a parallel Common Event, I have a variable store the number of party members I have and then use a script call to set move speed equal to 5-(x/4) (or your own).
4. I checked Sprite_Battler's code and found :blink and :damage, part of the collapse animation. Playing around, I have the battlers move around a bit when attacking or getting hit, or when the Cocooned states are involved, have them shake and wiggle.
5. I created WEB BARRIER. When the player is in this state, an enemy who attacks him will be inflicted with a WEBBED state. In your formula, simply include something like if b.state?(BARRIER) b.remove_state(BARRIER) a.add_state(WEBBED) end. Adding a state will also trigger the Conditional State tag. Alternatively, spells aren't physically touching the player, so you can burn the WEB BARRIER away with b.state?(BARRIER) b.remove_state(BARRIER) end
---
Here are the stuff I'm looking forward to:
-Shiggy's multi-skill can shoot extra skills. One of the skills I plan to create is based on World of Warcraft's Monk's chi talent, which is bouncing a ball back and forth.
-I'm not sure if I should use the Cannibalism/Devour/Cook scripts or use a common event, but in either case, I should do something about capturing enemy cocoons. At the basic, Female Cocoons will be temporary party members, but I'm not sure what bonuses other cocoons will provide.
-I notice I have State Faces script that change an Actor's face with another visual, which I know works even with Shape Shift. In another game, I would have demonstrated a wrapped (Shape Shift) person with hypno eyes (State Face). However, with "passive" states like SMALL from the example way above, and probably a few states exclusively for females, I think I can personalize those cocoons. Actually I recall a script that can change a battler's appearance via states, but I have some difficulty finding it.