Autorisation : Membre
Nb de messages : 23
Inscrit le : Jeu 06 Déc 2012, 8:12
Posté le : Mer 25 Nov 2015, 23:26
Hey ; Après quasiment deux ans d’absence sur ce site je reviens avec un programme assez fun et pratique pour tout les pokéfans
En effet ce programme utilise une algorithme permettant de savoir si tu as 100% de chance ou pas de capturer un pokémon !
------------------------------------------------------------------------
LA FORMULE UTILISÉ :
PVmax est le nombre maximal de PV que peut avoir le Pokémon ;
PVactuel le nombre de PV actuels du Pokémon ;
t son taux de capture ;
bstatut est le bonus du statut :
1 si le statut du Pokémon n'est pas altéré,
1,5 s'il est paralysé, empoisonné ou brûlé,
2 s'il est endormi ou gelé ;
bball est le Bonus Ball de la Ball utilisée : 1 pour une Poké Ball, 1,5 pour une Super Ball, etc...
------------------------------------------------------------------------
Inutile pour certains ou utile pour d'autres je le trouve assez fun xD
Bien sur c'est une version 0.1 donc il y a encore pleins de trucs qui n'y sont pas ... : -LES POKEMONS STATUS (TROP LONG A FAIRE CAR TROP DE POKEMON) les status pokémon sur ce site : http://goo.gl/ycuLcr
- NE FONCTIONNE POUR LE MOMENT QUE POUR LES : -pokeball simple
-superball
-hyperball
-master ball
-et safari ball
KISS PS : Je n'ai pas vraiment cherché à raccourcir le programme au cas où des personnes m'en ferais la remarque ;D
LE CODE : (ps : "!=" signifie pas égal / "->" signifie sto )
Code
Lbl 0
Menu("POKEMONCAPTURE","GO !",1,"END",2
Lbl 1
ClrHome
Input "PV MAX POKEMON :",A
Input "PV ACTUEL :",B
If B>A
Then
Disp "PV MAX>PV ACT!
Pause
Goto 1
Else
Disp "POUR TAUX CAPTURE
Disp "VOIR SUR INTERNET
Input "TAUX CAPTURE:",D
Lbl RE
ClrHome
Disp "STATUT POKEMON :"
Disp "RIEN 1
Disp "PARA,EMPOI.1,5
Disp "ENDORMI GELE 2
Input "CHOIX :",C
If C!=1 and C!=1.5 and C!=2
Then
Goto RE
Else
Goto SU
Lbl SU
ClrHome
((3*A-2*B)*D*1*C)/(3*A)->E
((3*A-2*B)*D*1.5*C)/(3*A)->F
((3*A-2*B)*D*2*C)/(3*A)->G
((3*A-2*B)*D*255*C)/(3*A)->H
ClrDraw
Text(1,1,"AVEC POKEBALL SIMPLE :
If E>=255
Then
Text(8,1,"100 CHANCE"
Goto AA
Else
If E<255
Then
Text(8,1,"CHANCE ALEATOIRE !
Goto AA
Lbl AA
Text(15,1,"SUPER ET SAFARI BALL :
If F>=255
Then
Text(22,1,"100 CHANCE"
Goto BB
Else
If F<255
Then
Text(22,1,"CHANCE ALEATOIRE !
Goto BB
Lbl BB
Text(29,1,"HYPERBALL :
If G>=255
Then
Text(36,1,"100 CHANCE"
Goto CC
Else
If G<255
Then
Text(36,1,"CHANCE ALEATOIRE !
Goto CC
Lbl CC
Text(43,1,"MASTERBALL :
If H>=255
Then
Text(50,1,"100 CHANCE"
Goto DD
Else
If H<255
Then
Text(50,1,"CHANCE ALEATOIRE !
Goto DD
Lbl DD
Pause
Goto 0
Lbl 2
End
Autorisation : Membre
Nb de messages : 504
Inscrit le : Ven 07 Déc 2012, 20:09
Posté le : Jeu 26 Nov 2015, 17:39
Pas mal ! Mais je pense qu'on peut l'améliorer
Pour commencer, voici ton code allégé :
Code
AxesOff
Lbl 0
Menu("POKEMONCAPTURE","GO !",1,"END",2
Lbl 1
ClrHome
Input "PV MAX POKEMON :",A
Input "PV ACTUEL :",B
If B>A
Then
Disp "PV MAX>PV ACT!
Pause
Goto 1
End
Disp "POUR TAUX CAPTURE","VOIR SUR INTERNET
Input "TAUX CAPTURE:",D
Lbl RE
ClrHome
Disp "STATUT POKEMON :","RIEN 1","PARA,PSN. 1,5","ENDORMI GELE 2
Input "CHOIX :",C
If prod(C!={1,1.5,2
Goto RE
ClrHome
(3A-2B)DC/(3A
ClrDraw
Text(1,1,"AVEC POKEBALL SIMPLE :
If Ans>=255
Then
Text(8,1,"100 CHANCE"
Else
Text(8,1,"CHANCE ALEATOIRE !
End
Text(15,1,"SUPER ET SAFARI BALL :
If 1.5Ans>=255
Then
Text(22,1,"100 CHANCE"
Else
Text(22,1,"CHANCE ALEATOIRE !
End
Text(29,1,"HYPERBALL :
If 2Ans>=255
Then
Text(36,1,"100 CHANCE"
Else
Text(36,1,"CHANCE ALEATOIRE !
End
Text(43,1,"MASTERBALL :
Text(50,1,"100 CHANCE"
End
Pause
Goto 0
Lbl 2
AxesOn
End
To noteras que j'ai dégagé le test de la Masterball, puisque c'est par définition impossible de rater avec elle ! J'ai aussi retiré l'affichage des axes, assez inesthétique.
Pourquoi ne pas donner le fameux taux, histoire que le dresseur puisse se faire une idée ?
Code
AxesOff
Lbl 0
Menu("POKEMONCAPTURE","GO !",1,"END",2
Lbl 1
ClrHome
Input "PV MAX POKEMON :",A
Input "PV ACTUEL :",B
If B>A
Then
Disp "PV MAX>PV ACT!
Pause
Goto 1
End
Disp "POUR TAUX CAPTURE","VOIR SUR INTERNET
Input "TAUX CAPTURE:",D
Lbl RE
ClrHome
Disp "STATUT POKEMON :","RIEN 1","PARA,PSN. 1,5","ENDORMI GELE 2
Input "CHOIX :",C
If prod(C!={1,1.5,2
Goto RE
ClrHome
(3A-2B)DC/(3A
ClrDraw
Text(1,1,"AVEC POKEBALL SIMPLE :
Text(8,1,20Ans/51
Text(15,1,"SUPER ET SAFARI BALL :
Text(22,1,10Ans/17
Text(29,1,"HYPERBALL :
Text(36,1,40Ans/51
Text(43,1,"MASTERBALL :
Text(50,1,100
Pause
Goto 0
Lbl 2
AxesOn
End
Autorisation : Membre
Nb de messages : 30
Inscrit le : Ven 06 Nov 2015, 14:08
Posté le : Jeu 03 Déc 2015, 18:14
C'est vrai que c'est pas très joli et que ça perd un octet, mais en général c'est mieux de l'écrire comme ça, même si pour ce programme c'est pas très important.
Sinon, j'avais pas remarqué, mais on peut remplacer cette partie par une boucle (j'ai édité le programme).