forked from github/server
- Drachen, die Wyrme werden, splitten sich auf und rennen
(hoffentlich) auseinander. - Drachenregionsbewertung leicht verändert. - Monsterverhalten muss beobachtet werden!
This commit is contained in:
parent
ae81e915b7
commit
a9c4d5c44b
|
@ -45,6 +45,7 @@
|
|||
#include <attrib.h>
|
||||
#include <base36.h>
|
||||
#include <event.h>
|
||||
#include <rand.h>
|
||||
|
||||
/* libc includes */
|
||||
#include <stdio.h>
|
||||
|
@ -366,10 +367,12 @@ move_monster(region * r, unit * u)
|
|||
int
|
||||
dragon_affinity_value(region *r, unit *u)
|
||||
{
|
||||
int m = count_all_money(r);
|
||||
|
||||
if(u->race == new_race[RC_FIREDRAGON]) {
|
||||
return (1+rand() % 6) + (int) (count_all_money(r) * (0.1 + drand48()));
|
||||
return (int)(normalvariate(m,m/2));
|
||||
} else {
|
||||
return (1+rand() % 6) + (int) (count_all_money(r) * (0.3 + drand48()));
|
||||
return (int)(normalvariate(m,m/4));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ age_dragon(unit *u)
|
|||
double q = (double) u->hp / (double) (unit_max_hp(u) * u->number);
|
||||
u->race = new_race[RC_WYRM];
|
||||
u->irace = new_race[RC_WYRM];
|
||||
scale_number(u,1);
|
||||
u->hp = (int) (unit_max_hp(u) * u->number * q);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,11 +38,6 @@
|
|||
/* NormalRand aus python, random.py geklaut, dort ist Referenz auf
|
||||
* den Algorithmus. mu = Mittelwert, sigma = Standardabweichung. */
|
||||
|
||||
/* Diese Funktion ist nicht thread-safe.
|
||||
* (enno) sicher, das irgend eine andere es ist?
|
||||
* Nebenbei: Ich glaub, sie ist es doch
|
||||
*/
|
||||
|
||||
double nv_next;
|
||||
char valid_next = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue