Coder Social home page Coder Social logo

Comments (2)

AlibabaSakura avatar AlibabaSakura commented on July 26, 2024

Ho già dato un piccolo spunto per i valori standard. Basterebbe alla fine usare un rand() tra 0 e 4 per ogni valore e poi un altro rand() per decidere se aggiungere o togliere questi valori.
Esempio di valori (notare che i parametri non coincidono con quelli della classe Personaggio per motivi dimostrativi)

/**
 * Statistiche base per l'RNG interno. Le statistiche varieranno di circa +/- 4 (aggiunta o riduzione)
 *
 * Structure:
 * 0 -> HP
 * 1 -> SP
 * 2 -> Attack
 * 3 -> Defense
 * 4 -> Speed
 */
public final String[] weak = {"20", "5", "0", "0", "5"};
public final String[] soldier = {"40", "15", "15", "15", "10"};
public final String[] farmer = {"25", "10", "7", "7", "7"};
public final String[] mercenary = {"50", "20", "20", "10", "15"};

from rpg-game-4inc.

alegotta avatar alegotta commented on July 26, 2024

Abbiamo deciso queste statistiche:
Personaggio = [ PV, ATK, DEF, VEL, Stamina ]
Debole = [ 50, 0, 0, 40, 5 ]
Contadino = [ 100, 35, 10, 50, 15 ]
Soldato = [ 180, 55, 35, 20, 25 ]
Mercenario = [ 200, 60, 25, 30, 22 ]

Difesa: intero da sottrarre al danno. Se il danno è minore di 1, va portato ad 1
Stamina: turni che il personaggio può combattere
Attacco: danno (punti vita che si perdono) non mitigato dalla difesa

Randomizzazione: +/- 2 per la stamina; +/- 5 per tutte le altre

from rpg-game-4inc.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.