Jump to content
Rpg²S Forum
  • 0

Aumentare durata status


crismon.trident
 Share

Question

Ciao,

dovrei creare uno status che aumenti di durata ogni volta che si subisce un attacco magico, pensavo di usare Buffs & States Core  con i tag:

<Custom React Effect>
if (action.isSkill() && action.isMagical()) {

origin. .......
}
</Custom React Effect>

non riesco a trovare lo script per aumentare i turni dello status, ho provato con; 

target.setStateTurns(10, target.stateTurns(10) + 3);

e tutte le varianti correlate, qulcuno saprebbe aiutarmi per favore.

Edited by crismon.trident
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Howdy!

Credo di avere risolto il tuo problema.

Prova a mettere nello stato 10 questo codice:

<Custom Respond Effect>

var item = this.item();

 

if (item && item.hitType === 2) {

var id = 10;

var turns = target.stateTurns(id) || 0;

target.setStateTurns(id, turns + 1);

}

</Custom Respond Effect>

item.hitType a 2 vuol dire che tutte le skill che hanno un attacco magico (quello che si può decidere nella skill, se l'attacco è sicuro, fisico o magico) contano. 
var id deve essere uguale a quello della skill, su target.setStateTurns metti tu quanti turni vuoi, io ne ho messo 1, magari tu ne vuoi mettere 3 come nell'esempio che hai fatto oppure 999 😅 

Buona giornata, fammi sapere se sei riuscito a fare quello che volevi fare!

Link to comment
Share on other sites

  • 0
Posted (edited)

Ciao e grazie mille, ho solo dovuto aggiustare qualcosa ma adesso funziona, lo script modificato è:

<Custom Respond Effect>

var item = this.item();

if (value > 0 && item.hitType === 2) {

var id = 52;

var turns = target.stateTurns(id) || 0;

target.setStateTurns(id, turns += 2);

}

</Custom Respond Effect>

 

Edited by crismon.trident
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...