private static void SetStats( Mobile m, NetState state, int str, int dex, int intel ) { int max = state.NewCharacterCreation ? 90 : 80; FixStats( ref str, ref dex, ref intel, max ); if ( str < 10 || str > 60 || dex < 10 || dex > 60 || intel < 10 || intel > 60 || (str + dex + intel) != max ) { str = 10; dex = 10; intel = 10; } m.InitStats( str, dex, intel ); }
private static void SetStats( Mobile m, int str, int dex, int intel ) { FixStats( ref str, ref dex, ref intel ); if ( str < 10 || str > 60 || dex < 10 || dex > 60 || intel < 10 || intel > 60 || (str + dex + intel) != 80 ) { str = 10; dex = 10; intel = 10; } m.InitStats( str, dex, intel ); }
private static void SetStats( Mobile m, int str, int dex, int intel ) { FixStat( ref str ); FixStat( ref dex ); FixStat( ref intel ); int total = str + dex + intel; if ( total > 90 ) str = dex = intel = 10; m.InitStats( str, dex, intel ); }
private static void SetStats( Mobile m, NetState state, int str, int dex, int intel ) { int max = state.NewCharacterCreation ? 90 : 80; FixStats( ref str, ref dex, ref intel, max ); if ( str < 10 || str > 60 || dex < 10 || dex > 60 || intel < 10 || intel > 60 || (str + dex + intel) != max ) { str = 10; dex = 10; intel = 10; } double scale = 1.0; double strr = str; double dexx = dex; double intell = intel; while (((int)strr + (int)dexx + (int)intell) > 65) { scale -= 0.0001; strr *= scale; dexx *= scale; intell *= scale; strr = Math.Ceiling(strr); dexx = Math.Ceiling(dexx); intell = Math.Ceiling(intell); if (strr < 10) strr = 10; if (dexx < 10) dexx = 10; if (intell < 10) intell = 10; } str = (int)strr; dex = (int)dexx; intel = (int)intell; m.InitStats( str, dex, intel ); }
private static void SetStats(Mobile m, NetState state, int str, int dex, int intel) { m.InitStats(100, 100, 100); //int max = state.NewCharacterCreation ? 90 : 80; //FixStats( ref str, ref dex, ref intel, max ); //if ( str < 10 || str > 60 || dex < 10 || dex > 60 || intel < 10 || intel > 60 || (str + dex + intel) != max ) //{ // str = 10; // dex = 10; // intel = 10; //} //m.InitStats( str, dex, intel ); }
private static void SetStats( Mobile m, int str, int dex, int intel ) { FixStats( ref str, ref dex, ref intel ); if ( str < 10 || str > 60 || dex < 10 || dex > 60 || intel < 10 || intel > 60 || (str + dex + intel) != 80 ) { str = 10; dex = 10; intel = 10; } // scale them down 25% for pret2a (where the max you could have was 45, total of 65) // if 2 of the stats you picked were 13, its possible to have 66 instead of 65 stats, but who cares? if ( str > 13 ) str = (int)(str * 0.75); if ( dex > 13 ) dex = (int)(dex * 0.75); if ( intel > 13 ) intel = (int)(intel * 0.75); m.InitStats( str, dex, intel ); }