Star

Star fields, brightness and mutagen checks, and the way back to its palace.

Fields

FieldTypeDescription
keystringLanguage-independent star key (MajorStar / MinorStar / AdjectiveStar / HoroscopeStar values)
namestringStar name in the chart language
typeStarTypemajor soft tough adjective flower helper lucun tianma
scopeScopeorigin for natal stars, the layer for horoscope stars
brightness / brightnessKeystring | undefined / Brightness | undefinedBrightness; undefined when there is none
mutagen / mutagenKeystring | undefined / Mutagen | undefinedBirth-year transformation; undefined when there is none

withBrightness / withMutagen

withBrightness(brightness: Brightness | readonly Brightness[]): boolean;
withMutagen(mutagen: Mutagen | readonly Mutagen[]): boolean;

With an array, any of its values matches.

palace / oppositePalace / surroundedPalaces

palace(): Palace | undefined;
oppositePalace(): Palace | undefined;
surroundedPalaces(): SurroundedPalaces | undefined;

A star on a chart knows its palace; horoscope stars and the stars returned by the placement functions hang off no palace, so all three are undefined for them.

const s = chart.star(MajorStar.TAIYANG)!;
console.log(s.key, s.name, s.type, s.scope, s.brightness, s.brightnessKey, s.mutagen, s.mutagenKey);
console.log(s.withBrightness([Brightness.MIAO, Brightness.WANG]), s.withMutagen(Mutagen.LU),
  s.palace()!.name, s.oppositePalace()!.name, s.surroundedPalaces()!.target.name);
taiyangMaj 太阳 major origin 庙 miao 禄 sihuaLu
true true 子女 田宅 子女

On this page