• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Pokemons Capture System

Status
Not open for further replies.
Level 12
Joined
Feb 11, 2008
Messages
809
Okay since it has not yet been successfully done I am working on a pokemon map it will be no were near the size of the actual game but it will use all the originals from pokemon yellow version and have matching systems to give you the feeling that your back on the old game boy color.

In this map i have already made the movement system and a few others including a pokeball system but my pokeball system just gives certain percentages to catch each different pokemon.

I need a system that starts a pokemon off at a certain % capture rate and as its health lowers the rate raises so basically the weaker the pokemon gets the easier it is to catch and if at all possible i would like it to be done in JASS/vJASS really anything except GUI.

With this system i need functionality thats really easy such as;
system.addunittype(unit type of pokemon, % to start the pokemon out at)
and with the percentages it needs to be just regular 1-100 to keep it simple.

please and thank you for anyone who can do this for me and of course you will be added to credits and +reped.
 
Level 12
Joined
Feb 11, 2008
Messages
809
There goes my chance.

if it comes done to it i guess gui will be okay but it has to be well programmed without leaks and keep the BJs to a minimum.

btw heres my current pokeball trigger so you all have a good idea of what im talking about and how im doing this;

  • Pokeball System
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Throw Pokeball
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Item carried by TrainersHero[(Player number of (Owner of (Triggering unit)))] of type Pokeball) is owned) Equal to (==) True
        • Then - Actions
          • Item - Set charges remaining in (Item carried by TrainersHero[(Player number of (Owner of (Triggering unit)))] of type Pokeball) to ((Charges remaining in (Item carried by TrainersHero[(Player number of (Owner of (Triggering unit)))] of type Pokeball)) - 1)
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Charges remaining in (Item carried by TrainersHero[(Player number of (Owner of (Triggering unit)))] of type Pokeball)) Equal to (==) 0
              • Then - Actions
                • Item - Remove (Item carried by TrainersHero[(Player number of (Owner of (Triggering unit)))] of type Pokeball)
              • Else - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Random integer number between 1 and 10) Less than (<) 7
              • Then - Actions
                • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Change color
                • Unit - Add classification of Mechanical to (Target unit of ability being cast)
                • Game - Display to (Player group((Triggering player))) the text: (You caught a + ((Name of (Target unit of ability being cast)) + congratulations!))
              • Else - Actions
                • Game - Display to (Player group((Triggering player))) the text: (|cffff0000You failed to catch the + ((Name of (Target unit of ability being cast)) + |r!))
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) the text: |cffff0000You don't...
      • Player Group - Destroy (Player group((Triggering player)))
and yes this trigger is very inefficient thats why im requesting a better one that has good functionality
 
Level 11
Joined
Feb 23, 2009
Messages
577
Its has NOTHING to do with GUI or JASS, here is the MATH u need.

Capture % = [100 - Pokemon % HP] + Pokeball POWER - Pokemon Lvl

Pokeball = 0 Power (adds 0%)
Great Ball = 30 Power (adds 30%)
Etc.

Lvl 100 Pokemon at 5% HP with a Great Ball = 25% chance
Lvl 7 Pokemon at 30% HP with a Pokeball = 63% chance

Hope this helped?


PS: working on a pokemon type game myself ;o
 
Last edited by a moderator:
Level 16
Joined
Aug 20, 2009
Messages
1,554
if it comes done to it i guess gui will be okay but it has to be well programmed without leaks and keep the BJs to a minimum.

btw heres my current pokeball trigger so you all have a good idea of what im talking about and how im doing this;

  • Pokeball System
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Throw Pokeball
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Item carried by TrainersHero[(Player number of (Owner of (Triggering unit)))] of type Pokeball) is owned) Equal to (==) True
        • Then - Actions
          • Item - Set charges remaining in (Item carried by TrainersHero[(Player number of (Owner of (Triggering unit)))] of type Pokeball) to ((Charges remaining in (Item carried by TrainersHero[(Player number of (Owner of (Triggering unit)))] of type Pokeball)) - 1)
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Charges remaining in (Item carried by TrainersHero[(Player number of (Owner of (Triggering unit)))] of type Pokeball)) Equal to (==) 0
              • Then - Actions
                • Item - Remove (Item carried by TrainersHero[(Player number of (Owner of (Triggering unit)))] of type Pokeball)
              • Else - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Random integer number between 1 and 10) Less than (<) 7
              • Then - Actions
                • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Change color
                • Unit - Add classification of Mechanical to (Target unit of ability being cast)
                • Game - Display to (Player group((Triggering player))) the text: (You caught a + ((Name of (Target unit of ability being cast)) + congratulations!))
              • Else - Actions
                • Game - Display to (Player group((Triggering player))) the text: (|cffff0000You failed to catch the + ((Name of (Target unit of ability being cast)) + |r!))
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) the text: |cffff0000You don't...
      • Player Group - Destroy (Player group((Triggering player)))
and yes this trigger is very inefficient thats why im requesting a better one that has good functionality

just what the heck is this pile of mess o.o
save everything to Variable.

such as player number of owner of trig units
triggering unit,
and owner of trig unit.

they give faster results and lesser processing

and game display player group ?? use loops and index,
never use player groups.
 
Level 12
Joined
Feb 11, 2008
Messages
809
just what the heck is this pile of mess o.o
save everything to Variable.

such as player number of owner of trig units
triggering unit,
and owner of trig unit.

they give faster results and lesser processing

and game display player group ?? use loops and index,
never use player groups.

lol this was just giving everyone an idea of what i wanted to do i didnt leak check or condense code it was just a qquick example and this was taken care of already thanks though.
 
Status
Not open for further replies.
Top