diff --git a/battle_srv/models/pb_type_convert.go b/battle_srv/models/pb_type_convert.go index 16d738e..1f802db 100644 --- a/battle_srv/models/pb_type_convert.go +++ b/battle_srv/models/pb_type_convert.go @@ -80,6 +80,12 @@ func toPbRoomDownsyncFrame(rdf *battle.RoomDownsyncFrame) *pb.RoomDownsyncFrame HitboxSizeY: last.Bullet.HitboxSizeY, BlowUp: last.Bullet.BlowUp, + + SpeciesId: last.Bullet.SpeciesId, + ExplosionFrames: last.Bullet.ExplosionFrames, + + BlState: last.BlState, + FramesInBlState: last.FramesInBlState, } ret.MeleeBullets[i] = pbBullet } @@ -112,6 +118,12 @@ func toPbRoomDownsyncFrame(rdf *battle.RoomDownsyncFrame) *pb.RoomDownsyncFrame BlowUp: last.Bullet.BlowUp, + SpeciesId: last.Bullet.SpeciesId, + ExplosionFrames: last.Bullet.ExplosionFrames, + + BlState: last.BlState, + FramesInBlState: last.FramesInBlState, + VirtualGridX: last.VirtualGridX, VirtualGridY: last.VirtualGridY, DirX: last.DirX, @@ -119,7 +131,6 @@ func toPbRoomDownsyncFrame(rdf *battle.RoomDownsyncFrame) *pb.RoomDownsyncFrame VelX: last.VelX, VelY: last.VelY, Speed: last.Speed, - SpeciesId: last.SpeciesId, } ret.FireballBullets[i] = pbBullet } diff --git a/battle_srv/protos/room_downsync_frame.pb.go b/battle_srv/protos/room_downsync_frame.pb.go index 5e77a80..8b5d8ca 100644 --- a/battle_srv/protos/room_downsync_frame.pb.go +++ b/battle_srv/protos/room_downsync_frame.pb.go @@ -831,6 +831,10 @@ type MeleeBullet struct { BlowUp bool `protobuf:"varint,18,opt,name=blowUp,proto3" json:"blowUp,omitempty"` TeamId int32 `protobuf:"varint,19,opt,name=teamId,proto3" json:"teamId,omitempty"` BulletLocalId int32 `protobuf:"varint,20,opt,name=bulletLocalId,proto3" json:"bulletLocalId,omitempty"` + SpeciesId int32 `protobuf:"varint,21,opt,name=speciesId,proto3" json:"speciesId,omitempty"` + ExplosionFrames int32 `protobuf:"varint,22,opt,name=explosionFrames,proto3" json:"explosionFrames,omitempty"` + BlState int32 `protobuf:"varint,23,opt,name=blState,proto3" json:"blState,omitempty"` + FramesInBlState int32 `protobuf:"varint,24,opt,name=framesInBlState,proto3" json:"framesInBlState,omitempty"` } func (x *MeleeBullet) Reset() { @@ -1005,6 +1009,34 @@ func (x *MeleeBullet) GetBulletLocalId() int32 { return 0 } +func (x *MeleeBullet) GetSpeciesId() int32 { + if x != nil { + return x.SpeciesId + } + return 0 +} + +func (x *MeleeBullet) GetExplosionFrames() int32 { + if x != nil { + return x.ExplosionFrames + } + return 0 +} + +func (x *MeleeBullet) GetBlState() int32 { + if x != nil { + return x.BlState + } + return 0 +} + +func (x *MeleeBullet) GetFramesInBlState() int32 { + if x != nil { + return x.FramesInBlState + } + return 0 +} + type FireballBullet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1031,6 +1063,9 @@ type FireballBullet struct { TeamId int32 `protobuf:"varint,19,opt,name=teamId,proto3" json:"teamId,omitempty"` BulletLocalId int32 `protobuf:"varint,20,opt,name=bulletLocalId,proto3" json:"bulletLocalId,omitempty"` SpeciesId int32 `protobuf:"varint,21,opt,name=speciesId,proto3" json:"speciesId,omitempty"` + ExplosionFrames int32 `protobuf:"varint,22,opt,name=explosionFrames,proto3" json:"explosionFrames,omitempty"` + BlState int32 `protobuf:"varint,23,opt,name=blState,proto3" json:"blState,omitempty"` + FramesInBlState int32 `protobuf:"varint,24,opt,name=framesInBlState,proto3" json:"framesInBlState,omitempty"` VirtualGridX int32 `protobuf:"varint,999,opt,name=virtualGridX,proto3" json:"virtualGridX,omitempty"` VirtualGridY int32 `protobuf:"varint,1000,opt,name=virtualGridY,proto3" json:"virtualGridY,omitempty"` DirX int32 `protobuf:"varint,1001,opt,name=dirX,proto3" json:"dirX,omitempty"` @@ -1219,6 +1254,27 @@ func (x *FireballBullet) GetSpeciesId() int32 { return 0 } +func (x *FireballBullet) GetExplosionFrames() int32 { + if x != nil { + return x.ExplosionFrames + } + return 0 +} + +func (x *FireballBullet) GetBlState() int32 { + if x != nil { + return x.BlState + } + return 0 +} + +func (x *FireballBullet) GetFramesInBlState() int32 { + if x != nil { + return x.FramesInBlState + } + return 0 +} + func (x *FireballBullet) GetVirtualGridX() int32 { if x != nil { return x.VirtualGridX @@ -1672,7 +1728,7 @@ var file_room_downsync_frame_proto_rawDesc = []byte{ 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x22, 0xfd, 0x05, 0x0a, 0x0b, 0x4d, 0x65, 0x6c, 0x65, + 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x22, 0x89, 0x07, 0x0a, 0x0b, 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, @@ -1720,143 +1776,159 @@ var file_room_downsync_frame_proto_rawDesc = []byte{ 0x6d, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x22, 0xd3, 0x07, 0x0a, 0x0e, 0x46, 0x69, 0x72, 0x65, - 0x62, 0x61, 0x6c, 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x17, 0x6f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, - 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x53, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x45, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, - 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, - 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, - 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, - 0x56, 0x65, 0x6c, 0x59, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0c, - 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, - 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, - 0x56, 0x65, 0x6c, 0x59, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x58, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, - 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, - 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, - 0x12, 0x20, 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, - 0x65, 0x58, 0x12, 0x20, 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, - 0x59, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, - 0x69, 0x7a, 0x65, 0x59, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x12, 0x16, 0x0a, 0x06, - 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, - 0x61, 0x6d, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, - 0x63, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x62, 0x75, 0x6c, - 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x76, 0x69, 0x72, 0x74, - 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x12, 0x23, 0x0a, - 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x59, 0x18, 0xe8, 0x07, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, - 0x64, 0x59, 0x12, 0x13, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x58, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x04, 0x64, 0x69, 0x72, 0x58, 0x12, 0x13, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x59, 0x18, - 0xea, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x64, 0x69, 0x72, 0x59, 0x12, 0x13, 0x0a, 0x04, - 0x76, 0x65, 0x6c, 0x58, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x76, 0x65, 0x6c, - 0x58, 0x12, 0x13, 0x0a, 0x04, 0x76, 0x65, 0x6c, 0x59, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x04, 0x76, 0x65, 0x6c, 0x59, 0x12, 0x15, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, - 0xed, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x22, 0xc9, 0x05, - 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, - 0x50, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x15, 0x77, 0x69, - 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x46, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, - 0x69, 0x63, 0x6b, 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, - 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, - 0x49, 0x64, 0x12, 0x30, 0x0a, 0x13, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x13, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, - 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x46, 0x0a, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x65, 0x73, 0x49, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x65, 0x73, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x73, 0x69, + 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, + 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x72, 0x61, + 0x6d, 0x65, 0x73, 0x49, 0x6e, 0x42, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x18, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x49, 0x6e, 0x42, 0x6c, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x22, 0xc1, 0x08, 0x0a, 0x0e, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, + 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, + 0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6f, 0x66, 0x66, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, + 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x46, 0x72, + 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x53, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x45, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x12, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x64, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x72, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x53, + 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x28, + 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, + 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x75, 0x73, 0x68, + 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, + 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x12, 0x22, 0x0a, 0x0c, + 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59, + 0x12, 0x16, 0x0a, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x6c, 0x66, + 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, + 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x58, 0x12, 0x22, 0x0a, 0x0c, + 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x66, 0x4c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x6c, 0x59, + 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x58, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, + 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, + 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x12, 0x20, 0x0a, 0x0b, + 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, 0x12, 0x20, + 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x59, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x59, + 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x77, 0x55, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, + 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, + 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, + 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, + 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, + 0x73, 0x49, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x65, 0x73, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x73, 0x69, 0x6f, + 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x65, + 0x78, 0x70, 0x6c, 0x6f, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x07, 0x62, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x49, 0x6e, 0x42, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x49, 0x6e, 0x42, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, + 0x64, 0x58, 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, + 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x12, 0x23, 0x0a, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, + 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x59, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, + 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x59, 0x12, 0x13, 0x0a, 0x04, + 0x64, 0x69, 0x72, 0x58, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x64, 0x69, 0x72, + 0x58, 0x12, 0x13, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x59, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x64, 0x69, 0x72, 0x59, 0x12, 0x13, 0x0a, 0x04, 0x76, 0x65, 0x6c, 0x58, 0x18, 0xeb, + 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x76, 0x65, 0x6c, 0x58, 0x12, 0x13, 0x0a, 0x04, 0x76, + 0x65, 0x6c, 0x59, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x76, 0x65, 0x6c, 0x59, + 0x12, 0x15, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0xed, 0x07, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x22, 0xc9, 0x05, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, + 0x50, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, + 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, 0x49, 0x66, 0x49, + 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x13, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, + 0x6e, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x46, + 0x0a, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, + 0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6c, - 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1e, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, - 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x1f, - 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1f, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, - 0x6c, 0x69, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, - 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x3a, 0x0a, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, - 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, - 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, - 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, - 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x12, 0x22, - 0x0a, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x59, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, - 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, - 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x12, 0x39, - 0x0a, 0x17, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, - 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x17, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, - 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xc2, 0x03, 0x0a, 0x11, 0x52, 0x6f, - 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x36, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x0a, 0x70, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, - 0x37, 0x0a, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, - 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x6c, 0x65, - 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x65, - 0x62, 0x61, 0x6c, 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x62, - 0x61, 0x6c, 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, - 0x61, 0x6c, 0x6c, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x16, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, - 0x4d, 0x61, 0x73, 0x6b, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, - 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x81, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x1f, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, + 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, + 0x50, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x1f, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x12, 0x3c, 0x0a, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, + 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, + 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x3a, + 0x0a, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x58, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x58, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x59, 0x12, 0x2a, 0x0a, 0x10, + 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x12, 0x39, 0x0a, 0x17, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x80, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x22, 0xc2, 0x03, 0x0a, 0x11, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, + 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, + 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, + 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, + 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x65, 0x6c, + 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, + 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, + 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, 0x42, 0x75, + 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, 0x42, 0x75, 0x6c, + 0x6c, 0x65, 0x74, 0x52, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x6c, 0x42, 0x75, 0x6c, + 0x6c, 0x65, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, + 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x18, 0x80, + 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, - 0x6e, 0x63, 0x12, 0x25, 0x0a, 0x0d, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x4c, - 0x69, 0x73, 0x74, 0x18, 0x82, 0x08, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x65, 0x73, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x14, 0x62, 0x75, 0x6c, - 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x72, 0x18, 0x83, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x13, - 0x5a, 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x63, 0x18, 0x81, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, + 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x25, 0x0a, 0x0d, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x82, 0x08, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x70, 0x65, 0x63, 0x69, 0x65, 0x73, 0x49, 0x64, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x14, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x49, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x83, 0x08, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x14, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, + 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x13, 0x5a, 0x11, 0x62, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x5f, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/frontend/assets/plugin_scripts/jsexport.js b/frontend/assets/plugin_scripts/jsexport.js index 9996996..6b9881a 100644 --- a/frontend/assets/plugin_scripts/jsexport.js +++ b/frontend/assets/plugin_scripts/jsexport.js @@ -9,8 +9,8 @@ $packages["runtime"]=(function(){var $pkg={},$init,A,C,D,AT,AZ,BD,AM,E,AU;A=$pac $packages["math/bits"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); $packages["math"]=(function(){var $pkg={},$init,B,A,IT,IU,IV,IW,FL,FM,FN,FO,FP,HH,EI,EX,EY,FK,GA,GH,GK,GL,GM,GS,GT,GW,GX,GZ,HA,HD,HI,HL,HM;B=$packages["github.com/gopherjs/gopherjs/js"];A=$packages["math/bits"];IT=$arrayType($Uint32,2);IU=$arrayType($Float32,2);IV=$arrayType($Float64,1);IW=$structType("math",[{prop:"uint32array",name:"uint32array",embedded:false,exported:false,typ:IT,tag:""},{prop:"float32array",name:"float32array",embedded:false,exported:false,typ:IU,tag:""},{prop:"float64array",name:"float64array",embedded:false,exported:false,typ:IV,tag:""}]);EI=function(av){var av,aw,ax,ay,az,ba,bb;aw=HL(av);ax=((($shiftRightUint64(aw,52).$low>>>0))&2047)>>>0;if(ax<1023){aw=(ay=new $Uint64(2147483648,0),new $Uint64(aw.$high&ay.$high,(aw.$low&ay.$low)>>>0));if(ax===1022){aw=(az=new $Uint64(1072693248,0),new $Uint64(aw.$high|az.$high,(aw.$low|az.$low)>>>0));}}else if(ax<1075){ax=ax-(1023)>>>0;aw=(ba=$shiftRightUint64(new $Uint64(524288,0),ax),new $Uint64(aw.$high+ba.$high,aw.$low+ba.$low));aw=(bb=$shiftRightUint64(new $Uint64(1048575,4294967295),ax),new $Uint64(aw.$high&~bb.$high,(aw.$low&~bb.$low)>>>0));}return HM(aw);};$pkg.Round=EI;EX=function(av,aw){var av,aw;if(GL(av,1)||GL(aw,1)){return GK(1);}else if(GM(av)||GM(aw)){return GW();}else if((av===0)&&(av===aw)){if(GZ(av)){return aw;}return av;}if(av>aw){return av;}return aw;};EY=function(av,aw){var av,aw;if(GL(av,-1)||GL(aw,-1)){return GK(-1);}else if(GM(av)||GM(aw)){return GW();}else if((av===0)&&(av===aw)){if(GZ(av)){return av;}return aw;}if(av>>0)));};$pkg.Abs=FK;GA=function(av){var av;return $parseFloat(FL.cos(av));};$pkg.Cos=GA;GH=function(av){var av;return $parseFloat(FL.floor(av));};$pkg.Floor=GH;GK=function(av){var av;if(av>=0){return FN;}else{return FO;}};$pkg.Inf=GK;GL=function(av,aw){var av,aw;if(av===FN){return aw>=0;}if(av===FO){return aw<=0;}return false;};$pkg.IsInf=GL;GM=function(av){var av,aw;aw=false;aw=!((av===av));return aw;};$pkg.IsNaN=GM;GS=function(av,aw){var av,aw;return EX(av,aw);};$pkg.Max=GS;GT=function(av,aw){var av,aw;return EY(av,aw);};$pkg.Min=GT;GW=function(){return FP;};$pkg.NaN=GW;GX=function(av,aw){var av,aw;if((av===1)||((av===-1)&&((aw===FN)||(aw===FO)))){return 1;}return $parseFloat(FL.pow(av,aw));};$pkg.Pow=GX;GZ=function(av){var av;return av<0||(1/av===FO);};$pkg.Signbit=GZ;HA=function(av){var av;return $parseFloat(FL.sin(av));};$pkg.Sin=HA;HD=function(av){var av;return $parseFloat(FL.sqrt(av));};$pkg.Sqrt=HD;HI=function(){var av;av=new($global.ArrayBuffer)(8);HH.uint32array=new($global.Uint32Array)(av);HH.float32array=new($global.Float32Array)(av);HH.float64array=new($global.Float64Array)(av);};HL=function(av){var av,aw,ax;HH.float64array[0]=av;return(aw=$shiftLeft64((new $Uint64(0,HH.uint32array[1])),32),ax=(new $Uint64(0,HH.uint32array[0])),new $Uint64(aw.$high+ax.$high,aw.$low+ax.$low));};$pkg.Float64bits=HL;HM=function(av){var av;HH.uint32array[0]=((av.$low>>>0));HH.uint32array[1]=(($shiftRightUint64(av,32).$low>>>0));return HH.float64array[0];};$pkg.Float64frombits=HM;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}HH=new IW.ptr(IT.zero(),IU.zero(),IV.zero());FL=$global.Math;FM=0;FN=1/FM;FO=-1/FM;FP=$parseFloat($NaN);HI();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); $packages["resolv"]=(function(){var $pkg={},$init,A,B,C,N,P,Q,S,U,X,Z,AA,AE,AG,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,K,O,R,T,V,W,Y,AB,AC,AD,AF,AH;A=$packages["math"];B=$pkg.Vector=$newType(12,$kindSlice,"resolv.Vector",true,"resolv",true,null);C=$pkg.Axis=$newType(4,$kindInt,"resolv.Axis",true,"resolv",true,null);N=$pkg.Space=$newType(0,$kindStruct,"resolv.Space",true,"resolv",true,function(Cells_,CellWidth_,CellHeight_){this.$val=this;if(arguments.length===0){this.Cells=AL.nil;this.CellWidth=0;this.CellHeight=0;return;}this.Cells=Cells_;this.CellWidth=CellWidth_;this.CellHeight=CellHeight_;});P=$pkg.Shape=$newType(8,$kindInterface,"resolv.Shape",true,"resolv",true,null);Q=$pkg.Line=$newType(0,$kindStruct,"resolv.Line",true,"resolv",true,function(Start_,End_){this.$val=this;if(arguments.length===0){this.Start=B.nil;this.End=B.nil;return;}this.Start=Start_;this.End=End_;});S=$pkg.ConvexPolygon=$newType(0,$kindStruct,"resolv.ConvexPolygon",true,"resolv",true,function(Points_,X_,Y_,Closed_){this.$val=this;if(arguments.length===0){this.Points=AP.nil;this.X=0;this.Y=0;this.Closed=false;return;}this.Points=Points_;this.X=X_;this.Y=Y_;this.Closed=Closed_;});U=$pkg.ContactSet=$newType(0,$kindStruct,"resolv.ContactSet",true,"resolv",true,function(Points_,MTV_,Center_){this.$val=this;if(arguments.length===0){this.Points=AP.nil;this.MTV=B.nil;this.Center=B.nil;return;}this.Points=Points_;this.MTV=MTV_;this.Center=Center_;});X=$pkg.Circle=$newType(0,$kindStruct,"resolv.Circle",true,"resolv",true,function(X_,Y_,Radius_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;this.Radius=0;return;}this.X=X_;this.Y=Y_;this.Radius=Radius_;});Z=$pkg.Projection=$newType(0,$kindStruct,"resolv.Projection",true,"resolv",true,function(Min_,Max_){this.$val=this;if(arguments.length===0){this.Min=0;this.Max=0;return;}this.Min=Min_;this.Max=Max_;});AA=$pkg.Object=$newType(0,$kindStruct,"resolv.Object",true,"resolv",true,function(Shape_,Space_,X_,Y_,W_,H_,TouchingCells_,Data_,ignoreList_,tags_){this.$val=this;if(arguments.length===0){this.Shape=$ifaceNil;this.Space=AM.nil;this.X=0;this.Y=0;this.W=0;this.H=0;this.TouchingCells=AK.nil;this.Data=$ifaceNil;this.ignoreList=false;this.tags=AV.nil;return;}this.Shape=Shape_;this.Space=Space_;this.X=X_;this.Y=Y_;this.W=W_;this.H=H_;this.TouchingCells=TouchingCells_;this.Data=Data_;this.ignoreList=ignoreList_;this.tags=tags_;});AE=$pkg.Collision=$newType(0,$kindStruct,"resolv.Collision",true,"resolv",true,function(checkingObject_,dx_,dy_,Objects_,Cells_){this.$val=this;if(arguments.length===0){this.checkingObject=AN.nil;this.dx=0;this.dy=0;this.Objects=AO.nil;this.Cells=AK.nil;return;}this.checkingObject=checkingObject_;this.dx=dx_;this.dy=dy_;this.Objects=Objects_;this.Cells=Cells_;});AG=$pkg.Cell=$newType(0,$kindStruct,"resolv.Cell",true,"resolv",true,function(X_,Y_,Objects_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;this.Objects=AO.nil;return;}this.X=X_;this.Y=Y_;this.Objects=Objects_;});AI=$sliceType($Float64);AJ=$ptrType(AG);AK=$sliceType(AJ);AL=$sliceType(AK);AM=$ptrType(N);AN=$ptrType(AA);AO=$sliceType(AN);AP=$sliceType(B);AQ=$ptrType(Q);AR=$sliceType(AQ);AS=$ptrType(X);AT=$ptrType(S);AU=$ptrType(U);AV=$sliceType($String);AW=$ptrType(AE);AX=$sliceType(C);AY=$mapType(AN,$Bool);B.prototype.Clone=function(){var a,b;a=this;b=$makeSlice(B,a.$length);$copySlice(b,a);return b;};$ptrType(B).prototype.Clone=function(){return this.$get().Clone();};B.prototype.Add=function(a){var a,b,c,d,e,f;b=this;c=b.$length;d=a;e=0;while(true){if(!(e=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]).$length>c){AC($convertSliceType(b,AI),1,$convertSliceType(b,AI),$convertSliceType($subslice(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),0,c),AI));}else{AC($convertSliceType(b,AI),1,$convertSliceType(b,AI),$convertSliceType(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),AI));}e++;}return b;};$ptrType(B).prototype.Add=function(a){return this.$get().Add(a);};B.prototype.Sub=function(a){var a,b,c,d,e,f;b=this;c=b.$length;d=a;e=0;while(true){if(!(e=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]).$length>c){AC($convertSliceType(b,AI),-1,$convertSliceType($subslice(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),0,c),AI),$convertSliceType(b,AI));}else{AC($convertSliceType(b,AI),-1,$convertSliceType(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),AI),$convertSliceType(b,AI));}e++;}return b;};$ptrType(B).prototype.Sub=function(a){return this.$get().Sub(a);};B.prototype.Scale=function(a){var a,b;b=this;AD($convertSliceType(b,AI),a,$convertSliceType(b,AI));return b;};$ptrType(B).prototype.Scale=function(a){return this.$get().Scale(a);};B.prototype.Equal=function(a){var a,b,c,d,e;b=this;if(!((b.$length===a.$length))){return false;}c=b;d=0;while(true){if(!(d=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e])-((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]))>1e-08){return false;}d++;}return true;};$ptrType(B).prototype.Equal=function(a){return this.$get().Equal(a);};B.prototype.Magnitude=function(){var a;a=this;return A.Sqrt(a.Magnitude2());};$ptrType(B).prototype.Magnitude=function(){return this.$get().Magnitude();};B.prototype.Magnitude2=function(){var a,b,c,d,e;a=this;b=0;c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=b+(e*e);d++;}return b;};$ptrType(B).prototype.Magnitude2=function(){return this.$get().Magnitude2();};B.prototype.Unit=function(){var a,b,c,d,e;a=this;b=a.Magnitude();if(b<1e-08){return a;}c=a;d=0;while(true){if(!(d=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]=((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e])/b);d++;}return a;};$ptrType(B).prototype.Unit=function(){return this.$get().Unit();};K=function(a,b){var a,b,c,d,e,f,g,h,i,j,k;c=0;d=a.$length;e=b.$length;f=c;g=d;h=e;if(g>h){b=$appendSlice(b,$convertSliceType($makeSlice(B,(g-h>>0)),AI));}if(g>0)),AI));}i=a;j=0;while(true){if(!(j=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+k])*((k<0||k>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+k]));j++;}return f;};$pkg.Dot=K;B.prototype.Dot=function(a){var a,b;b=this;return K(b,a);};$ptrType(B).prototype.Dot=function(a){return this.$get().Dot(a);};B.prototype.Cross=function(a){var a,b;b=this;if(!((b.$length===3))||!((a.$length===3))){return B.nil;}return new B([(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2])-(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]),(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])-(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]),(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2])-(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])]);};$ptrType(B).prototype.Cross=function(a){return this.$get().Cross(a);};B.prototype.Rotate=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c=this;d=2;e=c.$length;f=d;g=e;if(g===0){return c;}if(b.$length>0){f=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]);}if((g===1)&&!((f===2))){c=$append(c,0,0);}if((g<2&&(f===2))||((g===2)&&!((f===2)))){c=$append(c,0);}h=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]);i=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);j=h;k=i;l=A.Cos(a);m=A.Sin(a);n=l;o=m;p=f;if(p===(0)){q=(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]);(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=k*n-q*o);(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]=k*o+q*n);}else if(p===(1)){r=(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]);(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=j*n+r*o);(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]=-j*o+r*n);}else if(p===(2)){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=j*n-k*o);(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=j*o+k*n);}if(g>3){return $subslice(c,0,3);}return c;};$ptrType(B).prototype.Rotate=function(a,b){return this.$get().Rotate(a,b);};B.prototype.X=function(){var a;a=this;if(a.$length<1){return 0;}return(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]);};$ptrType(B).prototype.X=function(){return this.$get().X();};B.prototype.Y=function(){var a;a=this;if(a.$length<2){return 0;}return(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]);};$ptrType(B).prototype.Y=function(){return this.$get().Y();};B.prototype.Z=function(){var a;a=this;if(a.$length<3){return 0;}return(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]);};$ptrType(B).prototype.Z=function(){return this.$get().Z();};O=function(a,b,c,d){var a,b,c,d,e,f,g;e=new N.ptr(AL.nil,c,d);e.Resize((f=a/c,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero")),(g=b/d,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero")));return e;};$pkg.NewSpace=O;N.ptr.prototype.Add=function(a){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(b===AM.nil){$panic(new $String("ERROR: space is nil"));}c=a;d=0;case 1:if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);e.Space=b;$r=e.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d++;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:N.ptr.prototype.Add,$c:true,$r,a,b,c,d,e,$s};return $f;};N.prototype.Add=function(a){return this.$val.Add(a);};N.ptr.prototype.Remove=function(a){var a,b,c,d,e,f,g,h;b=this;if(b===AM.nil){$panic(new $String("ERROR: space is nil"));}c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=e.TouchingCells;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);h.unregister(e);g++;}e.TouchingCells=new AK([]);e.Space=AM.nil;d++;}};N.prototype.Remove=function(a){return this.$val.Remove(a);};N.ptr.prototype.Objects=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;a=this;b=$makeMap(AN.keyFor,[]);c=new AO([]);d=a.Cells;e=0;while(true){if(!(e=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+f]));i=0;while(true){if(!(i=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+f])),((j<0||j>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+j])).Objects;n=0;while(true){if(!(n=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+n]);p=(q=b[AN.keyFor(o)],q!==undefined?[q.v,true]:[false,false]);r=p[1];if(!r){c=$append(c,o);s=o;(b||$throwRuntimeError("assignment to entry in nil map"))[AN.keyFor(s)]={k:s,v:true};}n++;}i++;}e++;}return c;};N.prototype.Objects=function(){return this.$val.Objects();};N.ptr.prototype.Resize=function(a,b){var a,b,c,d,e,f,g;c=this;c.Cells=new AL([]);d=0;while(true){if(!(d=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+d]=$append((f=c.Cells,((d<0||d>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+d])),AH(e,d))));e=e+(1)>>0;}d=d+(1)>>0;}};N.prototype.Resize=function(a,b){return this.$val.Resize(a,b);};N.ptr.prototype.Cell=function(a,b){var a,b,c,d,e,f;c=this;if(b>=0&&b=0&&a<(d=c.Cells,((b<0||b>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])).$length){return(e=(f=c.Cells,((b<0||b>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+b])),((a<0||a>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+a]));}return AJ.nil;};N.prototype.Cell=function(a,b){return this.$val.Cell(a,b);};N.ptr.prototype.CheckCells=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m;f=this;g=a;while(true){if(!(g<(a+c>>0))){break;}h=b;while(true){if(!(h<(b+d>>0))){break;}i=f.Cell(g,h);if(!(i===AJ.nil)){if(e.$length>0){if(i.ContainsTags(e)){j=i.Objects;k=0;while(true){if(!(k=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]);if(l.HasTags(e)){return l;}k++;}}}else if(i.Occupied()){return(m=i.Objects,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0]));}}h=h+(1)>>0;}g=g+(1)>>0;}return AN.nil;};N.prototype.CheckCells=function(a,b,c,d,e){return this.$val.CheckCells(a,b,c,d,e);};N.ptr.prototype.CheckCellsWorld=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l;f=this;g=f.WorldToSpace(a,b);h=g[0];i=g[1];j=f.WorldToSpace(c,d);k=j[0];l=j[1];return f.CheckCells(h,i,k,l,e);};N.prototype.CheckCellsWorld=function(a,b,c,d,e){return this.$val.CheckCellsWorld(a,b,c,d,e);};N.ptr.prototype.UnregisterAllObjects=function(){var a,b,c,d,e,f,g;a=this;b=0;while(true){if(!(b=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])).$length)){break;}g=(e=(f=a.Cells,((b<0||b>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+b])),((c<0||c>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+c]));a.Remove(g.Objects);c=c+(1)>>0;}b=b+(1)>>0;}};N.prototype.UnregisterAllObjects=function(){return this.$val.UnregisterAllObjects();};N.ptr.prototype.WorldToSpace=function(a,b){var a,b,c,d,e;c=this;d=((A.Floor(a/(c.CellWidth))>>0));e=((A.Floor(b/(c.CellHeight))>>0));return[d,e];};N.prototype.WorldToSpace=function(a,b){return this.$val.WorldToSpace(a,b);};N.ptr.prototype.SpaceToWorld=function(a,b){var a,b,c,d,e;c=this;d=(($imul(a,c.CellWidth)));e=(($imul(b,c.CellHeight)));return[d,e];};N.prototype.SpaceToWorld=function(a,b){return this.$val.SpaceToWorld(a,b);};N.ptr.prototype.Height=function(){var a;a=this;return a.Cells.$length;};N.prototype.Height=function(){return this.$val.Height();};N.ptr.prototype.Width=function(){var a,b;a=this;if(a.Cells.$length>0){return(b=a.Cells,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])).$length;}return 0;};N.prototype.Width=function(){return this.$val.Width();};N.ptr.prototype.CellsInLine=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;e=this;f=new AK([]);g=e.Cell(a,b);h=e.Cell(c,d);if(!(g===AJ.nil)&&!(h===AJ.nil)){i=new B([((c-a>>0)),((d-b>>0))]).Unit();(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0]=(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])*(((j=e.CellWidth/2,(j===j&&j!==1/0&&j!==-1/0)?j>>0:$throwRuntimeError("integer divide by zero")))));(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]=(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1])*(((k=e.CellHeight/2,(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero")))));l=e.SpaceToWorld(a,b);m=l[0];n=l[1];q=new B([m+((o=e.CellWidth/2,(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"))),n+((p=e.CellHeight/2,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero")))]);r=false;while(true){if(!(!(g===AJ.nil))){break;}if(g===h){f=$append(f,g);break;}f=$append(f,g);if(r){(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]=(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1])+((1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1])));}else{(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]=(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0])+((0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])));}s=e.WorldToSpace((0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]),(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]));t=s[0];u=s[1];v=e.Cell(t,u);if(!(v===g)){g=v;}r=!r;}}return f;};N.prototype.CellsInLine=function(a,b,c,d){return this.$val.CellsInLine(a,b,c,d);};R=function(a,b,c,d){var a,b,c,d;return new Q.ptr(new B([a,b]),new B([c,d]));};$pkg.NewLine=R;Q.ptr.prototype.Project=function(a){var a,b;b=this;return b.Vector().Scale(a.Dot(b.Start.Sub(new AP([b.End]))));};Q.prototype.Project=function(a){return this.$val.Project(a);};Q.ptr.prototype.Normal=function(){var a,b;a=this;b=a.Vector();return new B([(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]),-(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])]).Unit();};Q.prototype.Normal=function(){return this.$val.Normal();};Q.ptr.prototype.Vector=function(){var a;a=this;return a.End.Clone().Sub(new AP([a.Start])).Unit();};Q.prototype.Vector=function(){return this.$val.Vector();};Q.ptr.prototype.IntersectionPointsLine=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=this;k=((c=b.End,(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]))-(d=b.Start,(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])))*((e=a.End,(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))-(f=a.Start,(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])))-((g=a.End,(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]))-(h=a.Start,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])))*((i=b.End,(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]))-(j=b.Start,(1>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+1])));if(!((k===0))){t=((((l=b.Start,(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1]))-(m=a.Start,(1>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+1])))*((n=a.End,(0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0]))-(o=a.Start,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0]))))-(((p=b.Start,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]))-(q=a.Start,(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0])))*((r=a.End,(1>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+1]))-(s=a.Start,(1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1]))))+1)/k;ac=((((u=b.Start,(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]))-(v=a.Start,(1>=v.$length?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+1])))*((w=b.End,(0>=w.$length?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+0]))-(x=b.Start,(0>=x.$length?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+0]))))-(((y=b.Start,(0>=y.$length?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+0]))-(z=a.Start,(0>=z.$length?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+0])))*((aa=b.End,(1>=aa.$length?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+1]))-(ab=b.Start,(1>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+1]))))+1)/k;if((0=ad.$length?($throwRuntimeError("index out of range"),undefined):ad.$array[ad.$offset+0]))-(ae=b.Start,(0>=ae.$length?($throwRuntimeError("index out of range"),undefined):ae.$array[ae.$offset+0]));ai=(ag=b.End,(1>=ag.$length?($throwRuntimeError("index out of range"),undefined):ag.$array[ag.$offset+1]))-(ah=b.Start,(1>=ah.$length?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+1]));return new B([(aj=b.Start,(0>=aj.$length?($throwRuntimeError("index out of range"),undefined):aj.$array[aj.$offset+0]))+(t*af),(ak=b.Start,(1>=ak.$length?($throwRuntimeError("index out of range"),undefined):ak.$array[ak.$offset+1]))+(t*ai)]);}}return B.nil;};Q.prototype.IntersectionPointsLine=function(a){return this.$val.IntersectionPointsLine(a);};Q.ptr.prototype.IntersectionPointsCircle=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b=this;c=new AP([]);d=new B([a.X,a.Y]);e=b.Start.Sub(new AP([d]));f=b.End.Sub(new AP([d]));g=f.Sub(new AP([e]));h=(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])+(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]);i=2*(((0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])*(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]))+((1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])*(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])));j=((0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])*(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]))+((1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])*(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))-(a.Radius*a.Radius);k=i*i-(4*h*j);if(k<0){}else if(k===0){l=-i/(2*h);if(l>=0&&l<=1){c=$append(c,new B([(m=b.Start,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0]))+l*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(n=b.Start,(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1]))+l*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}}else{o=(-i+A.Sqrt(k))/(2*h);if(o>=0&&o<=1){c=$append(c,new B([(p=b.Start,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]))+o*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(q=b.Start,(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]))+o*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}o=(-i-A.Sqrt(k))/(2*h);if(o>=0&&o<=1){c=$append(c,new B([(r=b.Start,(0>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+0]))+o*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(s=b.Start,(1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1]))+o*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}}return c;};Q.prototype.IntersectionPointsCircle=function(a){return this.$val.IntersectionPointsCircle(a);};T=function(a){var a,b;b=new S.ptr(new AP([]),0,0,true);b.AddPoints(a);return b;};$pkg.NewConvexPolygon=T;S.ptr.prototype.Clone=function(){var a,b,c,d,e,f;a=this;b=new AP([]);c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,e.Clone());d++;}f=T(AI.nil);f.X=a.X;f.Y=a.Y;f.AddPointsVec(b);f.Closed=a.Closed;return f;};S.prototype.Clone=function(){return this.$val.Clone();};S.ptr.prototype.AddPointsVec=function(a){var a,b;b=this;b.Points=$appendSlice(b.Points,a);};S.prototype.AddPointsVec=function(a){return this.$val.AddPointsVec(a);};S.ptr.prototype.AddPoints=function(a){var a,b,c,d;b=this;c=0;while(true){if(!(c=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c]),(d=c+1>>0,((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]))]));c=c+(2)>>0;}};S.prototype.AddPoints=function(a){return this.$val.AddPoints(a);};S.ptr.prototype.Lines=function(){var a,b,c,d,e,f,g,h,i,j;a=this;b=new AR([]);c=a.Transformed();d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]);g=e;h=f;if(d<(c.$length-1>>0)){h=(i=d+1>>0,((i<0||i>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+i]));}else if(!a.Closed){break;}j=R((0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]),(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));b=$append(b,j);d=d+(1)>>0;}return b;};S.prototype.Lines=function(){return this.$val.Lines();};S.ptr.prototype.Transformed=function(){var a,b,c,d,e;a=this;b=new AP([]);c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,new B([(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])+a.X,(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])+a.Y]));d++;}return b;};S.prototype.Transformed=function(){return this.$val.Transformed();};S.ptr.prototype.Bounds=function(){var a,b,c,d,e,f,g,h;a=this;b=a.Transformed();e=new B([(c=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])),(d=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]))]);f=e.Clone();g=0;while(true){if(!(g=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+g]);if((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])<(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])){(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]=(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]));}else if((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])>(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0])){(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]=(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]));}if((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])<(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])){(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]=(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));}else if((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])>(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])){(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1]=(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));}g=g+(1)>>0;}return[e,f];};S.prototype.Bounds=function(){return this.$val.Bounds();};S.ptr.prototype.Position=function(){var a;a=this;return[a.X,a.Y];};S.prototype.Position=function(){return this.$val.Position();};S.ptr.prototype.SetPosition=function(a,b){var a,b,c;c=this;c.X=a;c.Y=b;};S.prototype.SetPosition=function(a,b){return this.$val.SetPosition(a,b);};S.ptr.prototype.SetPositionVec=function(a){var a,b;b=this;b.X=a.X();b.Y=a.Y();};S.prototype.SetPositionVec=function(a){return this.$val.SetPositionVec(a);};S.ptr.prototype.Move=function(a,b){var a,b,c;c=this;c.X=c.X+(a);c.Y=c.Y+(b);};S.prototype.Move=function(a,b){return this.$val.Move(a,b);};S.ptr.prototype.MoveVec=function(a){var a,b;b=this;b.X=b.X+(a.X());b.Y=b.Y+(a.Y());};S.prototype.MoveVec=function(a){return this.$val.MoveVec(a);};S.ptr.prototype.Center=function(){var a,b,c,d,e;a=this;b=new B([0,0]);c=a.Transformed();d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b.Add(new AP([e]));d++;}(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])/((a.Transformed().$length)));(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]=(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])/((a.Transformed().$length)));return b;};S.prototype.Center=function(){return this.$val.Center();};S.ptr.prototype.Project=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=this;a=a.Unit();c=b.Transformed();f=a.Dot(new B([(d=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]),(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])),(e=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]),(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))]));g=f;h=1;while(true){if(!(h=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+h]),(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])),(j=((h<0||h>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+h]),(1>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+1]))]));if(kg){g=k;}h=h+(1)>>0;}return new Z.ptr(f,g);};S.prototype.Project=function(a){return this.$val.Project(a);};S.ptr.prototype.SATAxes=function(){var a,b,c,d,e;a=this;b=new AP([]);c=a.Lines();d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,e.Normal());d++;}return b;};S.prototype.SATAxes=function(){return this.$val.SATAxes();};S.ptr.prototype.PointInside=function(a){var a,b,c,d,e,f,g;b=this;c=R((0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]),(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]),(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])+9.99999999999e+11,(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]));d=0;e=b.Lines();f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(!(g.IntersectionPointsLine(c)===B.nil)){d=d+(1)>>0;}f++;}return d===1;};S.prototype.PointInside=function(a){return this.$val.PointInside(a);};V=function(){return new U.ptr(new AP([]),new B([0,0]),new B([0,0]));};$pkg.NewContactSet=V;U.ptr.prototype.LeftmostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])<(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){b=e;}d++;}return b;};U.prototype.LeftmostPoint=function(){return this.$val.LeftmostPoint();};U.ptr.prototype.RightmostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])>(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){b=e;}d++;}return b;};U.prototype.RightmostPoint=function(){return this.$val.RightmostPoint();};U.ptr.prototype.TopmostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])<(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])){b=e;}d++;}return b;};U.prototype.TopmostPoint=function(){return this.$val.TopmostPoint();};U.ptr.prototype.BottommostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])>(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])){b=e;}d++;}return b;};U.prototype.BottommostPoint=function(){return this.$val.BottommostPoint();};S.ptr.prototype.Intersection=function(a,b,c){var a,aa,ab,ac,ad,ae,af,ag,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=this;e=V();f=d.X;g=d.Y;d.X=d.X+(a);d.Y=d.Y+(b);h=$assertType(c,AS,true);i=h[0];j=h[1];if(j){k=d.Lines();l=0;while(true){if(!(l=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+l]);e.Points=$appendSlice(e.Points,m.IntersectionPointsCircle(i));l++;}}else{n=$assertType(c,AT,true);o=n[0];p=n[1];if(p){q=d.Lines();r=0;while(true){if(!(r=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]);t=o.Lines();u=0;while(true){if(!(u=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+u]);w=s.IntersectionPointsLine(v);if(!(w===B.nil)){e.Points=$append(e.Points,w);}u++;}r++;}}}if(e.Points.$length>0){x=e.Points;y=0;while(true){if(!(y=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+y]);e.Center=e.Center.Add(new AP([z]));y++;}(ab=e.Center,(0>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0]=(aa=e.Center,(0>=aa.$length?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+0]))/((e.Points.$length))));(ad=e.Center,(1>=ad.$length?($throwRuntimeError("index out of range"),undefined):ad.$array[ad.$offset+1]=(ac=e.Center,(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))/((e.Points.$length))));ae=d.calculateMTV(e,c);if(!(ae===B.nil)){e.MTV=ae;}}else{e=AU.nil;}if(!(e===AU.nil)&&(!((a===0))||!((b===0)))){af=new B([a,b]).Magnitude();ag=e.MTV.Magnitude();e.MTV=e.MTV.Unit().Scale(ag-af);}d.X=f;d.Y=g;return e;};S.prototype.Intersection=function(a,b,c){return this.$val.Intersection(a,b,c);};S.ptr.prototype.calculateMTV=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;c=this;d=new B([0,0]);e=new B([1.7976931348623157e+308,0]);f=b;if($assertType(f,AT,true)[1]){g=f.$val;h=c.SATAxes();i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if(!$clone(c.Project(j),Z).Overlapping($clone(g.Project(j),Z))){return B.nil;}k=$clone(c.Project(j),Z).Overlap($clone(g.Project(j),Z));if(e.Magnitude()>k){e=j.Scale(k);}i++;}l=g.SATAxes();m=0;while(true){if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);if(!$clone(c.Project(n),Z).Overlapping($clone(g.Project(n),Z))){return B.nil;}o=$clone(c.Project(n),Z).Overlap($clone(g.Project(n),Z));if(e.Magnitude()>o){e=n.Scale(o);}m++;}}(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]=(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]));(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]=(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]));return d;};S.prototype.calculateMTV=function(a,b){return this.$val.calculateMTV(a,b);};S.ptr.prototype.ContainedBy=function(a){var a,b,c,d,e,f,g,h,i,j;b=this;c=a;if($assertType(c,AT,true)[1]){d=c.$val;e=b.SATAxes();f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(!$clone(b.Project(g),Z).IsInside($clone(d.Project(g),Z))){return false;}f++;}h=d.SATAxes();i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if(!$clone(b.Project(j),Z).IsInside($clone(d.Project(j),Z))){return false;}i++;}}return true;};S.prototype.ContainedBy=function(a){return this.$val.ContainedBy(a);};S.ptr.prototype.FlipH=function(){var a,b,c,d;a=this;b=a.Points;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]=-(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]));c++;}a.ReverseVertexOrder();};S.prototype.FlipH=function(){return this.$val.FlipH();};S.ptr.prototype.FlipV=function(){var a,b,c,d;a=this;b=a.Points;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]=-(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]));c++;}a.ReverseVertexOrder();};S.prototype.FlipV=function(){return this.$val.FlipV();};S.ptr.prototype.ReverseVertexOrder=function(){var a,b,c,d,e;a=this;c=new AP([(b=a.Points,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]))]);d=a.Points.$length-1>>0;while(true){if(!(d>=1)){break;}c=$append(c,(e=a.Points,((d<0||d>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+d])));d=d-(1)>>0;}a.Points=c;};S.prototype.ReverseVertexOrder=function(){return this.$val.ReverseVertexOrder();};W=function(a,b,c,d){var a,b,c,d;return T(new AI([a,b,a+c,b,a+c,b+d,a,b+d]));};$pkg.NewRectangle=W;Y=function(a,b,c){var a,b,c,d;d=new X.ptr(a,b,c);return d;};$pkg.NewCircle=Y;X.ptr.prototype.Clone=function(){var a;a=this;return Y(a.X,a.Y,a.Radius);};X.prototype.Clone=function(){return this.$val.Clone();};X.ptr.prototype.Bounds=function(){var a;a=this;return[new B([a.X-a.Radius,a.Y-a.Radius]),new B([a.X+a.Radius,a.Y+a.Radius])];};X.prototype.Bounds=function(){return this.$val.Bounds();};X.ptr.prototype.Intersection=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;d=this;e=AU.nil;f=d.X;g=d.Y;d.X=d.X+(a);d.Y=d.Y+(b);h=c;if($assertType(h,AT,true)[1]){i=h.$val;e=i.Intersection(-a,-b,d);if(!(e===AU.nil)){e.MTV=e.MTV.Scale(-1);}}else if($assertType(h,AS,true)[1]){j=h.$val;e=V();e.Points=d.IntersectionPointsCircle(j);if(e.Points.$length===0){return AU.nil;}e.MTV=new B([d.X-j.X,d.Y-j.Y]);k=e.MTV.Magnitude();e.MTV=e.MTV.Unit().Scale(d.Radius+j.Radius-k);l=e.Points;m=0;while(true){if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);e.Center=e.Center.Add(new AP([n]));m++;}(p=e.Center,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]=(o=e.Center,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0]))/((e.Points.$length))));(r=e.Center,(1>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+1]=(q=e.Center,(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]))/((e.Points.$length))));}d.X=f;d.Y=g;return e;};X.prototype.Intersection=function(a,b,c){return this.$val.Intersection(a,b,c);};X.ptr.prototype.Move=function(a,b){var a,b,c;c=this;c.X=c.X+(a);c.Y=c.Y+(b);};X.prototype.Move=function(a,b){return this.$val.Move(a,b);};X.ptr.prototype.MoveVec=function(a){var a,b;b=this;b.X=b.X+(a.X());b.Y=b.Y+(a.Y());};X.prototype.MoveVec=function(a){return this.$val.MoveVec(a);};X.ptr.prototype.SetPosition=function(a,b){var a,b,c;c=this;c.X=a;c.Y=b;};X.prototype.SetPosition=function(a,b){return this.$val.SetPosition(a,b);};X.ptr.prototype.SetPositionVec=function(a){var a,b;b=this;b.X=a.X();b.Y=a.Y();};X.prototype.SetPositionVec=function(a){return this.$val.SetPositionVec(a);};X.ptr.prototype.Position=function(){var a;a=this;return[a.X,a.Y];};X.prototype.Position=function(){return this.$val.Position();};X.ptr.prototype.PointInside=function(a){var a,b;b=this;return a.Sub(new AP([new B([b.X,b.Y])])).Magnitude()<=b.Radius;};X.prototype.PointInside=function(a){return this.$val.PointInside(a);};X.ptr.prototype.IntersectionPointsCircle=function(a){var a,b,c,d,e,f,g;b=this;c=A.Sqrt(A.Pow(a.X-b.X,2)+A.Pow(a.Y-b.Y,2));if(c>b.Radius+a.Radius||c0;};Z.prototype.Overlapping=function(a){return this.$val.Overlapping(a);};Z.ptr.prototype.Overlap=function(a){var a,b;b=this;return A.Min(b.Max,a.Max)-A.Max(b.Min,a.Min);};Z.prototype.Overlap=function(a){return this.$val.Overlap(a);};Z.ptr.prototype.IsInside=function(a){var a,b;b=this;return b.Min>=a.Min&&b.Max<=a.Max;};Z.prototype.IsInside=function(a){return this.$val.IsInside(a);};AB=function(a,b,c,d,e){var a,b,c,d,e,f;f=new AA.ptr($ifaceNil,AM.nil,a,b,c,d,AK.nil,$ifaceNil,$makeMap(AN.keyFor,[]),new AV([]));if(e.$length>0){f.AddTags(e);}return f;};$pkg.NewObject=AB;AA.ptr.prototype.Clone=function(){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=AB(a.X,a.Y,a.W,a.H,a.Tags());b.Data=a.Data;if(!($interfaceIsEqual(a.Shape,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:c=a.Shape.Clone();$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}$r=b.SetShape(c);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:d=a.ignoreList;e=0;f=$keys(d);while(true){if(!(e>0;}h=h+(1)>>0;}}if(!($interfaceIsEqual(a.Shape,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:$r=a.Shape.SetPosition(a.X,a.Y);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:AA.ptr.prototype.Update,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};AA.prototype.Update=function(){return this.$val.Update();};AA.ptr.prototype.AddTags=function(a){var a,b;b=this;b.tags=$appendSlice(b.tags,a);};AA.prototype.AddTags=function(a){return this.$val.AddTags(a);};AA.ptr.prototype.RemoveTags=function(a){var a,b,c,d,e,f,g,h,i;b=this;c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=b.tags;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(i===e){b.tags=$appendSlice($subslice(b.tags,0,h),$subslice(b.tags,(h+1>>0)));break;}g++;}d++;}};AA.prototype.RemoveTags=function(a){return this.$val.RemoveTags(a);};AA.ptr.prototype.HasTags=function(a){var a,b,c,d,e,f,g,h;b=this;c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=b.tags;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(h===e){return true;}g++;}d++;}return false;};AA.prototype.HasTags=function(a){return this.$val.HasTags(a);};AA.ptr.prototype.Tags=function(){var a;a=this;return $appendSlice(new AV([]),a.tags);};AA.prototype.Tags=function(){return this.$val.Tags();};AA.ptr.prototype.SetShape=function(a){var{a,b,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(!($interfaceIsEqual(b.Shape,a))){$s=1;continue;}$s=2;continue;case 1:b.Shape=a;$r=b.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:AA.ptr.prototype.SetShape,$c:true,$r,a,b,$s};return $f;};AA.prototype.SetShape=function(a){return this.$val.SetShape(a);};AA.ptr.prototype.BoundsToSpace=function(a,b){var a,b,c,d,e,f,g,h,i;c=this;d=c.Space.WorldToSpace(c.X+a,c.Y+b);e=d[0];f=d[1];g=c.Space.WorldToSpace(c.X+c.W+a-1,c.Y+c.H+b-1);h=g[0];i=g[1];return[e,f,h,i];};AA.prototype.BoundsToSpace=function(a,b){return this.$val.BoundsToSpace(a,b);};AA.ptr.prototype.SharesCells=function(a){var a,b,c,d,e;b=this;c=b.TouchingCells;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.Contains(a)){return true;}d++;}return false;};AA.prototype.SharesCells=function(a){return this.$val.SharesCells(a);};AA.ptr.prototype.SharesCellsTags=function(a){var a,b,c,d,e;b=this;c=b.TouchingCells;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.ContainsTags(a)){return true;}d++;}return false;};AA.prototype.SharesCellsTags=function(a){return this.$val.SharesCellsTags(a);};AA.ptr.prototype.Center=function(){var a;a=this;return[a.X+(a.W/2),a.Y+(a.H/2)];};AA.prototype.Center=function(){return this.$val.Center();};AA.ptr.prototype.SetCenter=function(a,b){var a,b,c;c=this;c.X=a-(c.W/2);c.Y=b-(c.H/2);};AA.prototype.SetCenter=function(a,b){return this.$val.SetCenter(a,b);};AA.ptr.prototype.CellPosition=function(){var a,b;a=this;b=a.Center();return a.Space.WorldToSpace(b[0],b[1]);};AA.prototype.CellPosition=function(){return this.$val.CellPosition();};AA.ptr.prototype.SetRight=function(a){var a,b;b=this;b.X=a-b.W;};AA.prototype.SetRight=function(a){return this.$val.SetRight(a);};AA.ptr.prototype.SetBottom=function(a){var a,b;b=this;b.Y=a-b.H;};AA.prototype.SetBottom=function(a){return this.$val.SetBottom(a);};AA.ptr.prototype.Bottom=function(){var a;a=this;return a.Y+a.H;};AA.prototype.Bottom=function(){return this.$val.Bottom();};AA.ptr.prototype.Right=function(){var a;a=this;return a.X+a.W;};AA.prototype.Right=function(){return this.$val.Right();};AA.ptr.prototype.SetBounds=function(a,b){var a,b,c;c=this;c.X=(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]);c.Y=(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]);c.W=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])-c.X;c.H=(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])-c.Y;};AA.prototype.SetBounds=function(a,b){return this.$val.SetBounds(a,b);};AA.ptr.prototype.Check=function(a,b,c){var a,aa,ab,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=this;if(d.Space===AM.nil){return AW.nil;}e=AF();e.checkingObject=d;if(a<0){a=A.Min(a,-1);}else if(a>0){a=A.Max(a,1);}if(b<0){b=A.Min(b,-1);}else if(b>0){b=A.Max(b,1);}e.dx=a;e.dy=b;f=d.BoundsToSpace(a,b);g=f[0];h=f[1];i=f[2];j=f[3];k=$makeMap(AN.keyFor,[]);l=$makeMap(AJ.keyFor,[]);m=h;while(true){if(!(m<=j)){break;}n=g;while(true){if(!(n<=i)){break;}o=d.Space.Cell(n,m);if(!(o===AJ.nil)){p=o.Objects;q=0;while(true){if(!(q=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);t=(s=d.ignoreList[AN.keyFor(r)],s!==undefined?s.v:false);if(r===d||t){q++;continue;}u=(v=k[AN.keyFor(r)],v!==undefined?[v.v,true]:[false,false]);w=u[1];if(((c.$length===0)||r.HasTags(c))&&!w){e.Objects=$append(e.Objects,r);x=r;(k||$throwRuntimeError("assignment to entry in nil map"))[AN.keyFor(x)]={k:x,v:true};y=(z=l[AJ.keyFor(o)],z!==undefined?[z.v,true]:[false,false]);aa=y[1];if(!aa){e.Cells=$append(e.Cells,o);ab=o;(l||$throwRuntimeError("assignment to entry in nil map"))[AJ.keyFor(ab)]={k:ab,v:true};}q++;continue;}q++;}}n=n+(1)>>0;}m=m+(1)>>0;}if(e.Objects.$length===0){return AW.nil;}return e;};AA.prototype.Check=function(a,b,c){return this.$val.Check(a,b,c);};AA.ptr.prototype.Overlaps=function(a){var a,b;b=this;return a.X<=b.X+b.W&&a.X+a.W>=b.X&&a.Y<=b.Y+b.H&&a.Y+a.H>=b.Y;};AA.prototype.Overlaps=function(a){return this.$val.Overlaps(a);};AA.ptr.prototype.AddToIgnoreList=function(a){var a,b,c;b=this;c=a;(b.ignoreList||$throwRuntimeError("assignment to entry in nil map"))[AN.keyFor(c)]={k:c,v:true};};AA.prototype.AddToIgnoreList=function(a){return this.$val.AddToIgnoreList(a);};AA.ptr.prototype.RemoveFromIgnoreList=function(a){var a,b;b=this;delete b.ignoreList[AN.keyFor(a)];};AA.prototype.RemoveFromIgnoreList=function(a){return this.$val.RemoveFromIgnoreList(a);};AC=function(a,b,c,d){var a,b,c,d,e,f,g,h,i;e=d.$length;f=c;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(h===e){return;}((h<0||h>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+h]=b*i+((h<0||h>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+h]));g++;}};AD=function(a,b,c){var a,b,c,d,e,f;d=c;e=0;while(true){if(!(e=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]=((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f])*(b));e++;}};AF=function(){return new AE.ptr(AN.nil,0,0,new AO([]),AK.nil);};$pkg.NewCollision=AF;AE.ptr.prototype.HasTags=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e===b.checkingObject){d++;continue;}if(e.HasTags(a)){return true;}d++;}return false;};AE.prototype.HasTags=function(a){return this.$val.HasTags(a);};AE.ptr.prototype.ObjectsByTags=function(a){var a,b,c,d,e,f;b=this;c=new AO([]);d=b.Objects;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(f===b.checkingObject){e++;continue;}if(f.HasTags(a)){c=$append(c,f);}e++;}return c;};AE.prototype.ObjectsByTags=function(a){return this.$val.ObjectsByTags(a);};AE.ptr.prototype.ContactWithObject=function(a){var a,b,c;b=this;c=new B([0,0]);if(b.dx<0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=a.X+a.W-b.checkingObject.X);}else if(b.dx>0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=a.X-b.checkingObject.W-b.checkingObject.X);}if(b.dy<0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=a.Y+a.H-b.checkingObject.Y);}else if(b.dy>0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=a.Y-b.checkingObject.H-b.checkingObject.Y);}return c;};AE.prototype.ContactWithObject=function(a){return this.$val.ContactWithObject(a);};AE.ptr.prototype.ContactWithCell=function(a){var a,b,c,d,e;b=this;c=new B([0,0]);d=(($imul(a.X,b.checkingObject.Space.CellWidth)));e=(($imul(a.Y,b.checkingObject.Space.CellHeight)));if(b.dx<0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=d+(b.checkingObject.Space.CellWidth)-b.checkingObject.X);}else if(b.dx>0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=d-b.checkingObject.W-b.checkingObject.X);}if(b.dy<0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=e+(b.checkingObject.Space.CellHeight)-b.checkingObject.Y);}else if(b.dy>0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=e-b.checkingObject.H-b.checkingObject.Y);}return c;};AE.prototype.ContactWithCell=function(a){return this.$val.ContactWithCell(a);};AE.ptr.prototype.SlideAgainstCell=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;c=this;d=c.checkingObject.Space;f=(e=c.Cells,(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]));g=d.SpaceToWorld(f.X,f.Y);h=g[0];i=g[1];j=(d.CellWidth)/2;k=(d.CellHeight)/2;h=h+(j);i=i+(k);l=c.checkingObject.Center();m=l[0];n=l[1];o=m-h;p=n-i;q=d.Cell(f.X-1>>0,f.Y);r=d.Cell(f.X+1>>0,f.Y);s=d.Cell(f.X,f.Y-1>>0);t=d.Cell(f.X,f.Y+1>>0);u=new B([0,0]);if(!((c.dy===0))){if(o>0&&(r===AJ.nil||!r.ContainsTags(b))){(0>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+0]=h+j-c.checkingObject.X);}else if(o<0&&(q===AJ.nil||!q.ContainsTags(b))){(0>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+0]=h-j-(c.checkingObject.X+c.checkingObject.W));}else{return B.nil;}}if(!((c.dx===0))){if(p>0&&(t===AJ.nil||!t.ContainsTags(b))){(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]=i+k-c.checkingObject.Y);}else if(p<0&&(s===AJ.nil||!s.ContainsTags(b))){(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]=i-k-(c.checkingObject.Y+c.checkingObject.H));}else{return B.nil;}}return u;};AE.prototype.SlideAgainstCell=function(a,b){return this.$val.SlideAgainstCell(a,b);};AH=function(a,b){var a,b;return new AG.ptr(a,b,new AO([]));};AG.ptr.prototype.register=function(a){var a,b;b=this;if(!b.Contains(a)){b.Objects=$append(b.Objects,a);}};AG.prototype.register=function(a){return this.$val.register(a);};AG.ptr.prototype.unregister=function(a){var a,b,c,d,e,f,g,h,i;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(f===a){(i=b.Objects,((e<0||e>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+e]=(g=b.Objects,h=b.Objects.$length-1>>0,((h<0||h>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]))));b.Objects=$subslice(b.Objects,0,(b.Objects.$length-1>>0));break;}d++;}};AG.prototype.unregister=function(a){return this.$val.unregister(a);};AG.ptr.prototype.Contains=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e===a){return true;}d++;}return false;};AG.prototype.Contains=function(a){return this.$val.Contains(a);};AG.ptr.prototype.ContainsTags=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.HasTags(a)){return true;}d++;}return false;};AG.prototype.ContainsTags=function(a){return this.$val.ContainsTags(a);};AG.ptr.prototype.Occupied=function(){var a;a=this;return a.Objects.$length>0;};AG.prototype.Occupied=function(){return this.$val.Occupied();};B.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[B],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([AP],[B],true)},{prop:"Sub",name:"Sub",pkg:"",typ:$funcType([AP],[B],true)},{prop:"Scale",name:"Scale",pkg:"",typ:$funcType([$Float64],[B],false)},{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([B],[$Bool],false)},{prop:"Magnitude",name:"Magnitude",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Magnitude2",name:"Magnitude2",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Unit",name:"Unit",pkg:"",typ:$funcType([],[B],false)},{prop:"Dot",name:"Dot",pkg:"",typ:$funcType([B],[$Float64],false)},{prop:"Cross",name:"Cross",pkg:"",typ:$funcType([B],[B],false)},{prop:"Rotate",name:"Rotate",pkg:"",typ:$funcType([$Float64,AX],[B],true)},{prop:"X",name:"X",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Y",name:"Y",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Z",name:"Z",pkg:"",typ:$funcType([],[$Float64],false)}];AM.methods=[{prop:"Add",name:"Add",pkg:"",typ:$funcType([AO],[],true)},{prop:"Remove",name:"Remove",pkg:"",typ:$funcType([AO],[],true)},{prop:"Objects",name:"Objects",pkg:"",typ:$funcType([],[AO],false)},{prop:"Resize",name:"Resize",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Cell",name:"Cell",pkg:"",typ:$funcType([$Int,$Int],[AJ],false)},{prop:"CheckCells",name:"CheckCells",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int,AV],[AN],true)},{prop:"CheckCellsWorld",name:"CheckCellsWorld",pkg:"",typ:$funcType([$Float64,$Float64,$Float64,$Float64,AV],[AN],true)},{prop:"UnregisterAllObjects",name:"UnregisterAllObjects",pkg:"",typ:$funcType([],[],false)},{prop:"WorldToSpace",name:"WorldToSpace",pkg:"",typ:$funcType([$Float64,$Float64],[$Int,$Int],false)},{prop:"SpaceToWorld",name:"SpaceToWorld",pkg:"",typ:$funcType([$Int,$Int],[$Float64,$Float64],false)},{prop:"Height",name:"Height",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int],false)},{prop:"CellsInLine",name:"CellsInLine",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int],[AK],false)}];AQ.methods=[{prop:"Project",name:"Project",pkg:"",typ:$funcType([B],[B],false)},{prop:"Normal",name:"Normal",pkg:"",typ:$funcType([],[B],false)},{prop:"Vector",name:"Vector",pkg:"",typ:$funcType([],[B],false)},{prop:"IntersectionPointsLine",name:"IntersectionPointsLine",pkg:"",typ:$funcType([AQ],[B],false)},{prop:"IntersectionPointsCircle",name:"IntersectionPointsCircle",pkg:"",typ:$funcType([AS],[AP],false)}];AT.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[P],false)},{prop:"AddPointsVec",name:"AddPointsVec",pkg:"",typ:$funcType([AP],[],true)},{prop:"AddPoints",name:"AddPoints",pkg:"",typ:$funcType([AI],[],true)},{prop:"Lines",name:"Lines",pkg:"",typ:$funcType([],[AR],false)},{prop:"Transformed",name:"Transformed",pkg:"",typ:$funcType([],[AP],false)},{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[B,B],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"SetPositionVec",name:"SetPositionVec",pkg:"",typ:$funcType([B],[],false)},{prop:"Move",name:"Move",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"MoveVec",name:"MoveVec",pkg:"",typ:$funcType([B],[],false)},{prop:"Center",name:"Center",pkg:"",typ:$funcType([],[B],false)},{prop:"Project",name:"Project",pkg:"",typ:$funcType([B],[Z],false)},{prop:"SATAxes",name:"SATAxes",pkg:"",typ:$funcType([],[AP],false)},{prop:"PointInside",name:"PointInside",pkg:"",typ:$funcType([B],[$Bool],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,P],[AU],false)},{prop:"calculateMTV",name:"calculateMTV",pkg:"resolv",typ:$funcType([AU,P],[B],false)},{prop:"ContainedBy",name:"ContainedBy",pkg:"",typ:$funcType([P],[$Bool],false)},{prop:"FlipH",name:"FlipH",pkg:"",typ:$funcType([],[],false)},{prop:"FlipV",name:"FlipV",pkg:"",typ:$funcType([],[],false)},{prop:"ReverseVertexOrder",name:"ReverseVertexOrder",pkg:"",typ:$funcType([],[],false)}];AU.methods=[{prop:"LeftmostPoint",name:"LeftmostPoint",pkg:"",typ:$funcType([],[B],false)},{prop:"RightmostPoint",name:"RightmostPoint",pkg:"",typ:$funcType([],[B],false)},{prop:"TopmostPoint",name:"TopmostPoint",pkg:"",typ:$funcType([],[B],false)},{prop:"BottommostPoint",name:"BottommostPoint",pkg:"",typ:$funcType([],[B],false)}];AS.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[P],false)},{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[B,B],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,P],[AU],false)},{prop:"Move",name:"Move",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"MoveVec",name:"MoveVec",pkg:"",typ:$funcType([B],[],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"SetPositionVec",name:"SetPositionVec",pkg:"",typ:$funcType([B],[],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"PointInside",name:"PointInside",pkg:"",typ:$funcType([B],[$Bool],false)},{prop:"IntersectionPointsCircle",name:"IntersectionPointsCircle",pkg:"",typ:$funcType([AS],[AP],false)}];Z.methods=[{prop:"Overlapping",name:"Overlapping",pkg:"",typ:$funcType([Z],[$Bool],false)},{prop:"Overlap",name:"Overlap",pkg:"",typ:$funcType([Z],[$Float64],false)},{prop:"IsInside",name:"IsInside",pkg:"",typ:$funcType([Z],[$Bool],false)}];AN.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[AN],false)},{prop:"Update",name:"Update",pkg:"",typ:$funcType([],[],false)},{prop:"AddTags",name:"AddTags",pkg:"",typ:$funcType([AV],[],true)},{prop:"RemoveTags",name:"RemoveTags",pkg:"",typ:$funcType([AV],[],true)},{prop:"HasTags",name:"HasTags",pkg:"",typ:$funcType([AV],[$Bool],true)},{prop:"Tags",name:"Tags",pkg:"",typ:$funcType([],[AV],false)},{prop:"SetShape",name:"SetShape",pkg:"",typ:$funcType([P],[],false)},{prop:"BoundsToSpace",name:"BoundsToSpace",pkg:"",typ:$funcType([$Float64,$Float64],[$Int,$Int,$Int,$Int],false)},{prop:"SharesCells",name:"SharesCells",pkg:"",typ:$funcType([AN],[$Bool],false)},{prop:"SharesCellsTags",name:"SharesCellsTags",pkg:"",typ:$funcType([AV],[$Bool],true)},{prop:"Center",name:"Center",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetCenter",name:"SetCenter",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"CellPosition",name:"CellPosition",pkg:"",typ:$funcType([],[$Int,$Int],false)},{prop:"SetRight",name:"SetRight",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"SetBottom",name:"SetBottom",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"Bottom",name:"Bottom",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Right",name:"Right",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"SetBounds",name:"SetBounds",pkg:"",typ:$funcType([B,B],[],false)},{prop:"Check",name:"Check",pkg:"",typ:$funcType([$Float64,$Float64,AV],[AW],true)},{prop:"Overlaps",name:"Overlaps",pkg:"",typ:$funcType([AN],[$Bool],false)},{prop:"AddToIgnoreList",name:"AddToIgnoreList",pkg:"",typ:$funcType([AN],[],false)},{prop:"RemoveFromIgnoreList",name:"RemoveFromIgnoreList",pkg:"",typ:$funcType([AN],[],false)}];AW.methods=[{prop:"HasTags",name:"HasTags",pkg:"",typ:$funcType([AV],[$Bool],true)},{prop:"ObjectsByTags",name:"ObjectsByTags",pkg:"",typ:$funcType([AV],[AO],true)},{prop:"ContactWithObject",name:"ContactWithObject",pkg:"",typ:$funcType([AN],[B],false)},{prop:"ContactWithCell",name:"ContactWithCell",pkg:"",typ:$funcType([AJ],[B],false)},{prop:"SlideAgainstCell",name:"SlideAgainstCell",pkg:"",typ:$funcType([AJ,AV],[B],true)}];AJ.methods=[{prop:"register",name:"register",pkg:"resolv",typ:$funcType([AN],[],false)},{prop:"unregister",name:"unregister",pkg:"resolv",typ:$funcType([AN],[],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([AN],[$Bool],false)},{prop:"ContainsTags",name:"ContainsTags",pkg:"",typ:$funcType([AV],[$Bool],true)},{prop:"Occupied",name:"Occupied",pkg:"",typ:$funcType([],[$Bool],false)}];B.init($Float64);N.init("",[{prop:"Cells",name:"Cells",embedded:false,exported:true,typ:AL,tag:""},{prop:"CellWidth",name:"CellWidth",embedded:false,exported:true,typ:$Int,tag:""},{prop:"CellHeight",name:"CellHeight",embedded:false,exported:true,typ:$Int,tag:""}]);P.init([{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[B,B],false)},{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[P],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,P],[AU],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)}]);Q.init("",[{prop:"Start",name:"Start",embedded:false,exported:true,typ:B,tag:""},{prop:"End",name:"End",embedded:false,exported:true,typ:B,tag:""}]);S.init("",[{prop:"Points",name:"Points",embedded:false,exported:true,typ:AP,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Closed",name:"Closed",embedded:false,exported:true,typ:$Bool,tag:""}]);U.init("",[{prop:"Points",name:"Points",embedded:false,exported:true,typ:AP,tag:""},{prop:"MTV",name:"MTV",embedded:false,exported:true,typ:B,tag:""},{prop:"Center",name:"Center",embedded:false,exported:true,typ:B,tag:""}]);X.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Radius",name:"Radius",embedded:false,exported:true,typ:$Float64,tag:""}]);Z.init("",[{prop:"Min",name:"Min",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Max",name:"Max",embedded:false,exported:true,typ:$Float64,tag:""}]);AA.init("resolv",[{prop:"Shape",name:"Shape",embedded:false,exported:true,typ:P,tag:""},{prop:"Space",name:"Space",embedded:false,exported:true,typ:AM,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"W",name:"W",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"H",name:"H",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"TouchingCells",name:"TouchingCells",embedded:false,exported:true,typ:AK,tag:""},{prop:"Data",name:"Data",embedded:false,exported:true,typ:$emptyInterface,tag:""},{prop:"ignoreList",name:"ignoreList",embedded:false,exported:false,typ:AY,tag:""},{prop:"tags",name:"tags",embedded:false,exported:false,typ:AV,tag:""}]);AE.init("resolv",[{prop:"checkingObject",name:"checkingObject",embedded:false,exported:false,typ:AN,tag:""},{prop:"dx",name:"dx",embedded:false,exported:false,typ:$Float64,tag:""},{prop:"dy",name:"dy",embedded:false,exported:false,typ:$Float64,tag:""},{prop:"Objects",name:"Objects",embedded:false,exported:true,typ:AO,tag:""},{prop:"Cells",name:"Cells",embedded:false,exported:true,typ:AK,tag:""}]);AG.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Objects",name:"Objects",embedded:false,exported:true,typ:AO,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["jsexport/battle"]=(function(){var $pkg={},$init,A,B,C,D,E,F,H,I,J,K,L,M,N,O,P,Q,S,T,AH,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,U,V,W,X,Y,R,Z,AB,AC,AD,AE,AF,AG,AI,AJ,AK,AL,AM,AN,AO,AP,AR,AS,AT,AU,AV,AW,AX,AY,AZ;A=$packages["math"];B=$packages["resolv"];C=$pkg.Vec2D=$newType(0,$kindStruct,"battle.Vec2D",true,"jsexport/battle",true,function(X_,Y_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;return;}this.X=X_;this.Y=Y_;});D=$pkg.Polygon2D=$newType(0,$kindStruct,"battle.Polygon2D",true,"jsexport/battle",true,function(Anchor_,Points_){this.$val=this;if(arguments.length===0){this.Anchor=BZ.nil;this.Points=CA.nil;return;}this.Anchor=Anchor_;this.Points=Points_;});E=$pkg.PlayerDownsync=$newType(0,$kindStruct,"battle.PlayerDownsync",true,"jsexport/battle",true,function(Id_,VirtualGridX_,VirtualGridY_,DirX_,DirY_,VelX_,VelY_,Speed_,BattleState_,JoinIndex_,ColliderRadius_,Removed_,Score_,LastMoveGmtMillis_,FramesToRecover_,FramesInChState_,Hp_,MaxHp_,CharacterState_,InAir_,OnWall_,OnWallNormX_,OnWallNormY_,ActiveSkillId_,ActiveSkillHit_,FramesInvinsible_,BulletTeamId_,ChCollisionTeamId_){this.$val=this;if(arguments.length===0){this.Id=0;this.VirtualGridX=0;this.VirtualGridY=0;this.DirX=0;this.DirY=0;this.VelX=0;this.VelY=0;this.Speed=0;this.BattleState=0;this.JoinIndex=0;this.ColliderRadius=0;this.Removed=false;this.Score=0;this.LastMoveGmtMillis=0;this.FramesToRecover=0;this.FramesInChState=0;this.Hp=0;this.MaxHp=0;this.CharacterState=0;this.InAir=false;this.OnWall=false;this.OnWallNormX=0;this.OnWallNormY=0;this.ActiveSkillId=0;this.ActiveSkillHit=0;this.FramesInvinsible=0;this.BulletTeamId=0;this.ChCollisionTeamId=0;return;}this.Id=Id_;this.VirtualGridX=VirtualGridX_;this.VirtualGridY=VirtualGridY_;this.DirX=DirX_;this.DirY=DirY_;this.VelX=VelX_;this.VelY=VelY_;this.Speed=Speed_;this.BattleState=BattleState_;this.JoinIndex=JoinIndex_;this.ColliderRadius=ColliderRadius_;this.Removed=Removed_;this.Score=Score_;this.LastMoveGmtMillis=LastMoveGmtMillis_;this.FramesToRecover=FramesToRecover_;this.FramesInChState=FramesInChState_;this.Hp=Hp_;this.MaxHp=MaxHp_;this.CharacterState=CharacterState_;this.InAir=InAir_;this.OnWall=OnWall_;this.OnWallNormX=OnWallNormX_;this.OnWallNormY=OnWallNormY_;this.ActiveSkillId=ActiveSkillId_;this.ActiveSkillHit=ActiveSkillHit_;this.FramesInvinsible=FramesInvinsible_;this.BulletTeamId=BulletTeamId_;this.ChCollisionTeamId=ChCollisionTeamId_;});F=$pkg.InputFrameDecoded=$newType(0,$kindStruct,"battle.InputFrameDecoded",true,"jsexport/battle",true,function(Dx_,Dy_,BtnALevel_,BtnBLevel_){this.$val=this;if(arguments.length===0){this.Dx=0;this.Dy=0;this.BtnALevel=0;this.BtnBLevel=0;return;}this.Dx=Dx_;this.Dy=Dy_;this.BtnALevel=BtnALevel_;this.BtnBLevel=BtnBLevel_;});H=$pkg.Barrier=$newType(0,$kindStruct,"battle.Barrier",true,"jsexport/battle",true,function(Boundary_){this.$val=this;if(arguments.length===0){this.Boundary=CB.nil;return;}this.Boundary=Boundary_;});I=$pkg.BulletConfig=$newType(0,$kindStruct,"battle.BulletConfig",true,"jsexport/battle",true,function(StartupFrames_,CancellableStFrame_,CancellableEdFrame_,ActiveFrames_,HitStunFrames_,BlockStunFrames_,PushbackVelX_,PushbackVelY_,Damage_,SelfLockVelX_,SelfLockVelY_,HitboxOffsetX_,HitboxOffsetY_,HitboxSizeX_,HitboxSizeY_,BlowUp_,CancelTransit_){this.$val=this;if(arguments.length===0){this.StartupFrames=0;this.CancellableStFrame=0;this.CancellableEdFrame=0;this.ActiveFrames=0;this.HitStunFrames=0;this.BlockStunFrames=0;this.PushbackVelX=0;this.PushbackVelY=0;this.Damage=0;this.SelfLockVelX=0;this.SelfLockVelY=0;this.HitboxOffsetX=0;this.HitboxOffsetY=0;this.HitboxSizeX=0;this.HitboxSizeY=0;this.BlowUp=false;this.CancelTransit=false;return;}this.StartupFrames=StartupFrames_;this.CancellableStFrame=CancellableStFrame_;this.CancellableEdFrame=CancellableEdFrame_;this.ActiveFrames=ActiveFrames_;this.HitStunFrames=HitStunFrames_;this.BlockStunFrames=BlockStunFrames_;this.PushbackVelX=PushbackVelX_;this.PushbackVelY=PushbackVelY_;this.Damage=Damage_;this.SelfLockVelX=SelfLockVelX_;this.SelfLockVelY=SelfLockVelY_;this.HitboxOffsetX=HitboxOffsetX_;this.HitboxOffsetY=HitboxOffsetY_;this.HitboxSizeX=HitboxSizeX_;this.HitboxSizeY=HitboxSizeY_;this.BlowUp=BlowUp_;this.CancelTransit=CancelTransit_;});J=$pkg.BulletBattleAttr=$newType(0,$kindStruct,"battle.BulletBattleAttr",true,"jsexport/battle",true,function(BulletLocalId_,OriginatedRenderFrameId_,OffenderJoinIndex_,TeamId_){this.$val=this;if(arguments.length===0){this.BulletLocalId=0;this.OriginatedRenderFrameId=0;this.OffenderJoinIndex=0;this.TeamId=0;return;}this.BulletLocalId=BulletLocalId_;this.OriginatedRenderFrameId=OriginatedRenderFrameId_;this.OffenderJoinIndex=OffenderJoinIndex_;this.TeamId=TeamId_;});K=$pkg.MeleeBullet=$newType(0,$kindStruct,"battle.MeleeBullet",true,"jsexport/battle",true,function(BattleAttr_,Bullet_){this.$val=this;if(arguments.length===0){this.BattleAttr=BD.nil;this.Bullet=BE.nil;return;}this.BattleAttr=BattleAttr_;this.Bullet=Bullet_;});L=$pkg.FireballBullet=$newType(0,$kindStruct,"battle.FireballBullet",true,"jsexport/battle",true,function(VirtualGridX_,VirtualGridY_,DirX_,DirY_,VelX_,VelY_,Speed_,SpeciesId_,BattleAttr_,Bullet_){this.$val=this;if(arguments.length===0){this.VirtualGridX=0;this.VirtualGridY=0;this.DirX=0;this.DirY=0;this.VelX=0;this.VelY=0;this.Speed=0;this.SpeciesId=0;this.BattleAttr=BD.nil;this.Bullet=BE.nil;return;}this.VirtualGridX=VirtualGridX_;this.VirtualGridY=VirtualGridY_;this.DirX=DirX_;this.DirY=DirY_;this.VelX=VelX_;this.VelY=VelY_;this.Speed=Speed_;this.SpeciesId=SpeciesId_;this.BattleAttr=BattleAttr_;this.Bullet=Bullet_;});M=$pkg.Skill=$newType(0,$kindStruct,"battle.Skill",true,"jsexport/battle",true,function(BattleLocalId_,RecoveryFrames_,RecoveryFramesOnBlock_,RecoveryFramesOnHit_,ReleaseTriggerType_,BoundChState_,Hits_){this.$val=this;if(arguments.length===0){this.BattleLocalId=0;this.RecoveryFrames=0;this.RecoveryFramesOnBlock=0;this.RecoveryFramesOnHit=0;this.ReleaseTriggerType=0;this.BoundChState=0;this.Hits=BC.nil;return;}this.BattleLocalId=BattleLocalId_;this.RecoveryFrames=RecoveryFrames_;this.RecoveryFramesOnBlock=RecoveryFramesOnBlock_;this.RecoveryFramesOnHit=RecoveryFramesOnHit_;this.ReleaseTriggerType=ReleaseTriggerType_;this.BoundChState=BoundChState_;this.Hits=Hits_;});N=$pkg.RoomDownsyncFrame=$newType(0,$kindStruct,"battle.RoomDownsyncFrame",true,"jsexport/battle",true,function(Id_,PlayersArr_,CountdownNanos_,MeleeBullets_,FireballBullets_,BackendUnconfirmedMask_,ShouldForceResync_,BulletLocalIdCounter_){this.$val=this;if(arguments.length===0){this.Id=0;this.PlayersArr=BR.nil;this.CountdownNanos=new $Int64(0,0);this.MeleeBullets=BS.nil;this.FireballBullets=BT.nil;this.BackendUnconfirmedMask=new $Uint64(0,0);this.ShouldForceResync=false;this.BulletLocalIdCounter=0;return;}this.Id=Id_;this.PlayersArr=PlayersArr_;this.CountdownNanos=CountdownNanos_;this.MeleeBullets=MeleeBullets_;this.FireballBullets=FireballBullets_;this.BackendUnconfirmedMask=BackendUnconfirmedMask_;this.ShouldForceResync=ShouldForceResync_;this.BulletLocalIdCounter=BulletLocalIdCounter_;});O=$pkg.InputFrameDownsync=$newType(0,$kindStruct,"battle.InputFrameDownsync",true,"jsexport/battle",true,function(InputFrameId_,InputList_,ConfirmedList_){this.$val=this;if(arguments.length===0){this.InputFrameId=0;this.InputList=BQ.nil;this.ConfirmedList=new $Uint64(0,0);return;}this.InputFrameId=InputFrameId_;this.InputList=InputList_;this.ConfirmedList=ConfirmedList_;});P=$pkg.NpcPatrolCue=$newType(0,$kindStruct,"battle.NpcPatrolCue",true,"jsexport/battle",true,function(FlAct_,FrAct_,X_,Y_){this.$val=this;if(arguments.length===0){this.FlAct=new $Uint64(0,0);this.FrAct=new $Uint64(0,0);this.X=0;this.Y=0;return;}this.FlAct=FlAct_;this.FrAct=FrAct_;this.X=X_;this.Y=Y_;});Q=$pkg.RingBuffer=$newType(0,$kindStruct,"battle.RingBuffer",true,"jsexport/battle",true,function(Ed_,St_,EdFrameId_,StFrameId_,N_,Cnt_,Eles_){this.$val=this;if(arguments.length===0){this.Ed=0;this.St=0;this.EdFrameId=0;this.StFrameId=0;this.N=0;this.Cnt=0;this.Eles=BC.nil;return;}this.Ed=Ed_;this.St=St_;this.EdFrameId=EdFrameId_;this.StFrameId=StFrameId_;this.N=N_;this.Cnt=Cnt_;this.Eles=Eles_;});S=$pkg.SkillMapperType=$newType(4,$kindFunc,"battle.SkillMapperType",true,"jsexport/battle",true,null);T=$pkg.CharacterConfig=$newType(0,$kindStruct,"battle.CharacterConfig",true,"jsexport/battle",true,function(SpeciesId_,SpeciesName_,InAirIdleFrameIdxTurningPoint_,InAirIdleFrameIdxTurnedCycle_,LayDownFrames_,LayDownFramesToRecover_,GetUpInvinsibleFrames_,GetUpFramesToRecover_,Speed_,JumpingInitVelY_,DashingEnabled_,OnWallEnabled_,WallJumpingFramesToRecover_,WallJumpingInitVelX_,WallJumpingInitVelY_,WallSlidingVelY_,SkillMapper_){this.$val=this;if(arguments.length===0){this.SpeciesId=0;this.SpeciesName="";this.InAirIdleFrameIdxTurningPoint=0;this.InAirIdleFrameIdxTurnedCycle=0;this.LayDownFrames=0;this.LayDownFramesToRecover=0;this.GetUpInvinsibleFrames=0;this.GetUpFramesToRecover=0;this.Speed=0;this.JumpingInitVelY=0;this.DashingEnabled=false;this.OnWallEnabled=false;this.WallJumpingFramesToRecover=0;this.WallJumpingInitVelX=0;this.WallJumpingInitVelY=0;this.WallSlidingVelY=0;this.SkillMapper=$throwNilPointerError;return;}this.SpeciesId=SpeciesId_;this.SpeciesName=SpeciesName_;this.InAirIdleFrameIdxTurningPoint=InAirIdleFrameIdxTurningPoint_;this.InAirIdleFrameIdxTurnedCycle=InAirIdleFrameIdxTurnedCycle_;this.LayDownFrames=LayDownFrames_;this.LayDownFramesToRecover=LayDownFramesToRecover_;this.GetUpInvinsibleFrames=GetUpInvinsibleFrames_;this.GetUpFramesToRecover=GetUpFramesToRecover_;this.Speed=Speed_;this.JumpingInitVelY=JumpingInitVelY_;this.DashingEnabled=DashingEnabled_;this.OnWallEnabled=OnWallEnabled_;this.WallJumpingFramesToRecover=WallJumpingFramesToRecover_;this.WallJumpingInitVelX=WallJumpingInitVelX_;this.WallJumpingInitVelY=WallJumpingInitVelY_;this.WallSlidingVelY=WallSlidingVelY_;this.SkillMapper=SkillMapper_;});AH=$pkg.SatResult=$newType(0,$kindStruct,"battle.SatResult",true,"jsexport/battle",true,function(Overlap_,OverlapX_,OverlapY_,AContainedInB_,BContainedInA_,Axis_){this.$val=this;if(arguments.length===0){this.Overlap=0;this.OverlapX=0;this.OverlapY=0;this.AContainedInB=false;this.BContainedInA=false;this.Axis=B.Vector.nil;return;}this.Overlap=Overlap_;this.OverlapX=OverlapX_;this.OverlapY=OverlapY_;this.AContainedInB=AContainedInB_;this.BContainedInA=BContainedInA_;this.Axis=Axis_;});BA=$sliceType($Int32);BB=$sliceType(BA);BC=$sliceType($emptyInterface);BD=$ptrType(J);BE=$ptrType(I);BF=$ptrType(M);BG=$ptrType(K);BH=$ptrType(AH);BI=$sliceType(C);BJ=$sliceType($String);BK=$ptrType(B.Collision);BL=$ptrType(BI);BM=$ptrType(E);BN=$ptrType(L);BO=$ptrType(B.ConvexPolygon);BP=$ptrType(O);BQ=$sliceType($Uint64);BR=$sliceType(BM);BS=$sliceType(BG);BT=$sliceType(BN);BU=$sliceType(BL);BV=$sliceType($Bool);BW=$ptrType(B.Object);BX=$sliceType(BW);BY=$sliceType($Float64);BZ=$ptrType(C);CA=$sliceType(BZ);CB=$ptrType(D);CC=$mapType($Int,$Int);CD=$ptrType(Q);R=function(a){var a;return new Q.ptr(0,0,0,0,a,0,$makeSlice(BC,a));};$pkg.NewRingBuffer=R;Q.ptr.prototype.Put=function(a){var a,b,c,d;b=this;while(true){if(!(0=b.N)){break;}b.Pop();}(c=b.Eles,d=b.Ed,((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]=a));b.EdFrameId=b.EdFrameId+(1)>>0;b.Cnt=b.Cnt+(1)>>0;b.Ed=b.Ed+(1)>>0;if(b.Ed>=b.N){b.Ed=b.Ed-(b.N)>>0;}};Q.prototype.Put=function(a){return this.$val.Put(a);};Q.ptr.prototype.Pop=function(){var a,b,c,d;a=this;if(0===a.Cnt){return $ifaceNil;}d=(b=a.Eles,c=a.St,((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]));a.StFrameId=a.StFrameId+(1)>>0;a.Cnt=a.Cnt-(1)>>0;a.St=a.St+(1)>>0;if(a.St>=a.N){a.St=a.St-(a.N)>>0;}return d;};Q.prototype.Pop=function(){return this.$val.Pop();};Q.ptr.prototype.GetArrIdxByOffset=function(a){var a,b,c;b=this;if((0===b.Cnt)||0>a){return-1;}c=b.St+a>>0;if(b.St=b.N){c=c-(b.N)>>0;}if(c>=b.St||c=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+c]));};Q.prototype.GetByOffset=function(a){return this.$val.GetByOffset(a);};Q.ptr.prototype.GetByFrameId=function(a){var a,b;b=this;if(a>=b.EdFrameId||a>0);};Q.prototype.GetByFrameId=function(a){return this.$val.GetByFrameId(a);};Q.ptr.prototype.SetByFrameId=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;c=this;d=c.StFrameId;e=c.EdFrameId;f=d;g=e;if(bb){h=c.GetArrIdxByOffset(b-c.StFrameId>>0);if(!((-1===h))){(i=c.Eles,((h<0||h>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+h]=a));return[0,f,g];}}j=0;if(g>0))>>2>>0);};$pkg.ConvertToDelayedInputFrameId=AC;AD=function(a){var a;return(a>>2>>0);};$pkg.ConvertToNoDelayInputFrameId=AD;AE=function(a){var a;return(((a<<2>>0))+4>>0);};$pkg.ConvertToFirstUsedRenderFrameId=AE;AF=function(a){var a;return(((((a<<2>>0))+4>>0)+4>>0)-1>>0);};$pkg.ConvertToLastUsedRenderFrameId=AF;AG=function(a){var a,b,c,d,e,f,g,h;b=new $Uint64(a.$high&0,(a.$low&15)>>>0);d=(((c=$shiftRightUint64(a,4),new $Uint64(c.$high&0,(c.$low&1)>>>0)).$low>>0));f=(((e=$shiftRightUint64(a,5),new $Uint64(e.$high&0,(e.$low&1)>>>0)).$low>>0));return new F.ptr((g=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])),(h=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])),d,f);};AI=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];e=[e];f=[f];g=c[0].Position();e[0]=g[0];f[0]=g[1];$deferred.push([(function(c,e,f){return function(){c[0].SetPosition(e[0],f[0]);};})(c,e,f),[]]);c[0].SetPosition(e[0]+a,f[0]+b);h=new AH.ptr(0,0,0,true,true,new B.Vector([0,0]));i=AJ(c[0],d,h);if(i){$s=1;continue;}$s=2;continue;case 1:j=h.Overlap*h.OverlapX;k=h.Overlap*h.OverlapY;l=j;m=k;n=[true,l,m,h];$s=4;case 4:return n;case 2:o=[false,0,0,h];$s=5;case 5:return o;case 3:$s=-1;return[false,0,0,BH.nil];}return;}}catch(err){$err=err;$s=-1;return[false,0,0,BH.nil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:AI,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred};return $f;}}};AJ=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;d=a.Points.$length;e=b.Points.$length;f=d;g=e;if((1===f)&&(1===g)){if(!(BH.nil===c)){c.Overlap=0;}return((h=(i=a.Points,(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])),(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))===(j=(k=b.Points,(0>=k.$length?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+0])),(0>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+0])))&&((l=(m=a.Points,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0])),(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1]))===(n=(o=b.Points,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0])),(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1])));}if(1=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);if(AK(a,b,r.Unit(),c)){return false;}q++;}}if(1=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]);if(AK(a,b,u.Unit(),c)){return false;}t++;}}return true;};AK=function(a,b,c,d){var a,aa,ab,ac,ad,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=1.7e+308;f=-1.7e+308;g=1.7e+308;h=-1.7e+308;i=e;j=f;k=g;l=h;m=a.Points;n=0;while(true){if(!(n=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]);p=((0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0])+a.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+1])+a.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(i>p){i=p;}if(j=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]);t=((0>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+0])+b.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1])+b.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(k>t){k=t;}if(ll||jl){u=i-l;d.AContainedInB=false;}else{x=j-k;y=l-i;if(x=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0])))&&(0===(ac=d.Axis,(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))))||z>aa){ad=1;if(u<0){ad=-1;}d.Overlap=aa;d.OverlapX=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])*ad;d.OverlapY=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1])*ad;}d.Axis=c;}return false;};AL=function(a,b){var a,b,c,d;c=((A.Round(a*100)>>0));d=((A.Round(b*100)>>0));return[c,d];};$pkg.WorldToVirtualGridPos=AL;AM=function(a,b){var a,b,c,d;c=(a)*0.01;d=(b)*0.01;return[c,d];};$pkg.VirtualGridToWorldPos=AM;AN=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a-c-g+i,b-d-f+j];};$pkg.WorldToPolygonColliderBLPos=AN;AO=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a+c+g-i,b+d+f-j];};$pkg.PolygonColliderBLToWorldPos=AO;AP=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j,k,l,m;k=AO(a,b,c,d,e,f,g,h,i,j);l=k[0];m=k[1];return AL(l,m);};$pkg.PolygonColliderBLToVirtualGridPos=AP;AR=function(a,b,c,d,e,f,g){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g});$s=$s||0;s:while(true){switch($s){case 0:h=[h];h[0]=$makeSlice(BI,0,10);i=0;if((16===b.CharacterState)&&(0===c.VelX)&&(b.DirX===c.DirX)){j=1;if(0>c.DirX){j=-j;}i=j*(b.Speed)*0.01;}k=d.Check(i,0,new BJ([]));if(BK.nil===k){$s=-1;return(h.$ptr||(h.$ptr=new BL(function(){return this.$target[0];},function($v){this.$target[0]=$v;},h)));}l=k.Objects;m=0;case 1:if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);o=false;p=n.Data;if($assertType(p,BM,true)[1]||$assertType(p,BG,true)[1]||$assertType(p,BN,true)[1]){}else{o=true;}if(!o){m++;$s=1;continue;}q=$assertType(n.Shape,BO);s=AI(0,0,e,q);$s=3;case 3:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;t=r[0];u=r[1];v=r[2];w=r[3];if(!t){m++;$s=1;continue;}x=(w.Overlap-f)*w.OverlapX;y=(w.Overlap-f)*w.OverlapY;u=x;v=y;h[0]=$append(h[0],new C.ptr(w.OverlapX,w.OverlapY));g.X=g.X+(u);g.Y=g.Y+(v);m++;$s=1;continue;case 2:$s=-1;return(h.$ptr||(h.$ptr=new BL(function(){return this.$target[0];},function($v){this.$target[0]=$v;},h)));}return;}var $f={$blk:AR,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s};return $f;};AS=function(a,b,c,d){var a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=AC(c.Id);f=AC(c.Id-1>>0);if(0>=e){return[-2,false,0,0];}g=(h=W[$Int32.keyFor(a.CharacterState)],h!==undefined?[h.v,true]:[false,false]);i=g[1];if(i){return[-2,false,0,0];}j=$assertType(d.GetByFrameId(e),BP).InputList;k=BQ.nil;if(0>0,((n<0||n>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+n])));p=0;q=0;r=p;s=q;t=0;u=0;v=t;w=u;if(!(BQ.nil===k)){y=AG((x=m-1>>0,((x<0||x>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+x])));v=y.BtnALevel;w=y.BtnBLevel;}if(0===a.FramesToRecover){z=o.Dx;aa=o.Dy;r=z;s=aa;if(o.BtnBLevel>w){ab=(ac=V[$Int32.keyFor(a.CharacterState)],ac!==undefined?[ac.v,true]:[false,false]);ad=ab[1];if(!ad){l=true;}else if(16===a.CharacterState){l=true;}}}ae=-1;if(o.BtnALevel>v){if(0>s){ae=3;}else if(0=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]);((l<0||l>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+l]=new E.ptr(m.Id,m.VirtualGridX,m.VirtualGridY,m.DirX,m.DirY,m.VelX,m.VelY,m.Speed,m.BattleState,m.JoinIndex,m.ColliderRadius,m.Removed,m.Score,0,m.FramesToRecover-1>>0,m.FramesInChState+1>>0,m.Hp,m.MaxHp,m.CharacterState,true,false,m.OnWallNormX,m.OnWallNormY,m.ActiveSkillId,m.ActiveSkillHit,m.FramesInvinsible-1>>0,0,0));if(((l<0||l>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+l]).FramesToRecover<0){((l<0||l>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+l]).FramesToRecover=0;}if(((l<0||l>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+l]).FramesInvinsible<0){((l<0||l>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+l]).FramesInvinsible=0;}k++;}n=$makeSlice(BS,0,b.MeleeBullets.$length);o=$makeSlice(BT,0,b.FireballBullets.$length);p=$makeSlice(BI,h);q=$makeSlice(BU,h);r=$makeSlice(BV,h);s=b.BulletLocalIdCounter;t=b.PlayersArr;u=0;case 1:if(!(u=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+u]);z=((x<0||x>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+x]);aa=((x<0||x>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+x]);ab=AS(y,aa,b,a);ac=ab[0];ad=ab[1];ae=ab[2];af=ab[3];((x<0||x>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+x]=ad);ag=y.JoinIndex;ah=z.SkillMapper(ac,y);$s=3;case 3:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ai=ah;aj=(ak=U[$Int.keyFor(ai)],ak!==undefined?[ak.v,true]:[BF.nil,false]);al=aj[0];am=aj[1];if(am){aa.ActiveSkillId=((ai>>0));aa.ActiveSkillHit=0;aa.FramesToRecover=al.RecoveryFrames;an=1;if(0>aa.DirX){an=-an;}ao=false;ap=(aq=al.Hits,ar=aa.ActiveSkillHit,((ar<0||ar>=aq.$length)?($throwRuntimeError("index out of range"),undefined):aq.$array[aq.$offset+ar]));if($assertType(ap,BG,true)[1]){as=ap.$val;v[0]=$clone(as,K);v[0].BattleAttr=new J.ptr(s,b.Id,ag,y.BulletTeamId);s=s+(1)>>0;n=$append(n,v[0]);if(!((-1===as.Bullet.SelfLockVelX))){ao=true;aa.VelX=$imul(an,as.Bullet.SelfLockVelX);}if(!((-1===as.Bullet.SelfLockVelY))){ao=true;aa.VelY=as.Bullet.SelfLockVelY;}}else if($assertType(ap,BN,true)[1]){at=ap.$val;w[0]=$clone(at,L);w[0].BattleAttr=new J.ptr(s,b.Id,ag,y.BulletTeamId);s=s+(1)>>0;au=y.VirtualGridX+($imul(an,w[0].Bullet.HitboxOffsetX))>>0;av=y.VirtualGridY+w[0].Bullet.HitboxOffsetY>>0;w[0].VirtualGridX=au;w[0].VirtualGridY=av;w[0].DirX=an;w[0].DirY=0;w[0].VelX=$imul(w[0].Speed,an);w[0].VelY=0;o=$append(o,w[0]);if(!((-1===at.Bullet.SelfLockVelX))){ao=true;aa.VelX=$imul(an,at.Bullet.SelfLockVelX);}if(!((-1===at.Bullet.SelfLockVelY))){ao=true;aa.VelY=at.Bullet.SelfLockVelY;}}if(false===ao&&false===y.InAir){aa.VelX=0;}aa.CharacterState=al.BoundChState;u++;$s=1;continue;}if(0===y.FramesToRecover){if(!((0===ae))){aw=1;if(0>ae){aw=-aw;}aa.DirX=ae;aa.DirY=af;aa.VelX=$imul(aw,y.Speed);if(Z(aa.VelX)=ay.$length)?($throwRuntimeError("index out of range"),undefined):ay.$array[ay.$offset+az]);bc=bb.JoinIndex;bd=0;be=0;(bf=bc-1>>0,((bf<0||bf>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+bf])).X=bd;(bg=bc-1>>0,((bg<0||bg>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+bg])).Y=be;bh=((ba<0||ba>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+ba]);bi=((ba<0||ba>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+ba]);bj=bb.VirtualGridX+bb.VelX>>0;bk=bb.VirtualGridY+bb.VelY>>0;bl=bj;bm=bk;if(((ba<0||ba>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+ba])){if(16===bb.CharacterState){if(0<($imul(bb.VelX,bb.OnWallNormX))){bl=bl-(bb.VelX)>>0;}bn=-1;if(0>bb.OnWallNormX){bn=-bn;}bl=bl+(($imul(bn,bi.WallJumpingInitVelX)))>>0;bm=bm+(bi.WallJumpingInitVelY)>>0;bh.VelX=(($imul(bn,bi.WallJumpingInitVelX)));bh.VelY=(bi.WallJumpingInitVelY);bh.FramesToRecover=bi.WallJumpingFramesToRecover;}else{bh.VelY=(bi.JumpingInitVelY);bm=bm+(bi.JumpingInitVelY)>>0;}}bo=AM(bl,bm);bp=bo[0];bq=bo[1];br=$imul(bb.ColliderRadius,2);bs=$imul(bb.ColliderRadius,4);bt=br;bu=bs;bv=bb.CharacterState;if(bv===(9)){bw=$imul(bb.ColliderRadius,4);bx=$imul(bb.ColliderRadius,2);bt=bw;bu=bx;}else if((bv===(8))||(bv===(4))||(bv===(5))||(bv===(16))){by=$imul(bb.ColliderRadius,2);bz=$imul(bb.ColliderRadius,2);bt=by;bu=bz;}ca=AM(bt,bu);cb=ca[0];cc=ca[1];cd=AU(bp,bq,cb,cc,0.1,0.1,0.1,0.1,e,f,bb,"Player");$s=6;case 6:if($c){$c=false;cd=cd.$blk();}if(cd&&cd.$blk!==undefined){break s;}ce=cd;((ba<0||ba>=ax.$length)?($throwRuntimeError("index out of range"),undefined):ax.$array[ax.$offset+ba]=ce);$r=c.Add(new BX([ce]));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(bb.InAir){if((16===bb.CharacterState)&&!((ba<0||ba>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+ba])){bh.VelX=bh.VelX+(0)>>0;bh.VelY=bi.WallSlidingVelY;}else{bh.VelX=bh.VelX+(0)>>0;bh.VelY=bh.VelY+(-50)>>0;}}az++;$s=4;continue;case 5:cf=$makeSlice(BX,0,b.MeleeBullets.$length);cg=b.MeleeBullets;ch=0;case 8:if(!(ch=cg.$length)?($throwRuntimeError("index out of range"),undefined):cg.$array[cg.$offset+ch]);if(((ci.BattleAttr.OriginatedRenderFrameId+ci.Bullet.StartupFrames>>0)<=b.Id)&&(((ci.BattleAttr.OriginatedRenderFrameId+ci.Bullet.StartupFrames>>0)+ci.Bullet.ActiveFrames>>0)>b.Id)){$s=10;continue;}if(((ci.BattleAttr.OriginatedRenderFrameId+ci.Bullet.StartupFrames>>0)+ci.Bullet.ActiveFrames>>0)>b.Id){$s=11;continue;}$s=12;continue;case 10:cl=(cj=b.PlayersArr,ck=ci.BattleAttr.OffenderJoinIndex-1>>0,((ck<0||ck>=cj.$length)?($throwRuntimeError("index out of range"),undefined):cj.$array[cj.$offset+ck]));cm=1;if(0>cl.DirX){cm=-cm;}cn=AM(cl.VirtualGridX+($imul(cm,ci.Bullet.HitboxOffsetX))>>0,cl.VirtualGridY);co=cn[0];cp=cn[1];cq=AM(ci.Bullet.HitboxSizeX,ci.Bullet.HitboxSizeY);cr=cq[0];cs=cq[1];ct=AU(co,cp,cr,cs,0.1,0.1,0.1,0.1,e,f,ci,"MeleeBullet");$s=13;case 13:if($c){$c=false;ct=ct.$blk();}if(ct&&ct.$blk!==undefined){break s;}cu=ct;$r=c.Add(new BX([cu]));$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}cf=$append(cf,cu);$s=12;continue;case 11:n=$append(n,ci);case 12:ch++;$s=8;continue;case 9:cv=b.FireballBullets;cw=0;case 15:if(!(cw=cv.$length)?($throwRuntimeError("index out of range"),undefined):cv.$array[cv.$offset+cw]);cy=new L.ptr(cx.VirtualGridX,cx.VirtualGridY,cx.DirX,cx.DirY,cx.VelX,cx.VelY,cx.Speed,cx.SpeciesId,cx.BattleAttr,cx.Bullet);if(((cy.BattleAttr.OriginatedRenderFrameId+cy.Bullet.StartupFrames>>0)>0)+cy.Bullet.ActiveFrames>>0)>b.Id)){$s=17;continue;}if(((cy.BattleAttr.OriginatedRenderFrameId+cy.Bullet.StartupFrames>>0)+cy.Bullet.ActiveFrames>>0)>b.Id){$s=18;continue;}$s=19;continue;case 17:cz=AM(cy.VirtualGridX,cy.VirtualGridY);da=cz[0];db=cz[1];dc=AM(cy.Bullet.HitboxSizeX,cy.Bullet.HitboxSizeY);dd=dc[0];de=dc[1];df=AU(da,db,dd,de,0.1,0.1,0.1,0.1,e,f,cy,"FireballBullet");$s=20;case 20:if($c){$c=false;df=df.$blk();}if(df&&df.$blk!==undefined){break s;}dg=df;$r=c.Add(new BX([dg]));$s=21;case 21:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}cf=$append(cf,dg);$s=19;continue;case 18:o=$append(o,cy);case 19:cw++;$s=15;continue;case 16:dh=b.PlayersArr;di=0;case 22:if(!(di=dh.$length)?($throwRuntimeError("index out of range"),undefined):dh.$array[dh.$offset+di]);dl=dk.JoinIndex;dm=((dj<0||dj>=ax.$length)?($throwRuntimeError("index out of range"),undefined):ax.$array[ax.$offset+dj]);dn=$assertType(dm.Shape,BO);dp=((dj<0||dj>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+dj]);dr=AR(dl,dk,dp,dm,dn,0.1,(dq=dl-1>>0,((dq<0||dq>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+dq])));$s=24;case 24:if($c){$c=false;dr=dr.$blk();}if(dr&&dr.$blk!==undefined){break s;}(ds=dl-1>>0,((ds<0||ds>=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+ds]=dr));dt=((dj<0||dj>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+dj]);du=false;dv=dm.Check(0,0,new BJ([]));if(!(BK.nil===dv)){$s=25;continue;}$s=26;continue;case 25:dw=dv.Objects;dx=0;case 27:if(!(dx=dw.$length)?($throwRuntimeError("index out of range"),undefined):dw.$array[dw.$offset+dx]);dz=false;ea=false;eb=false;ec=dz;ed=ea;ee=eb;ef=dy.Data;if($assertType(ef,BM,true)[1]){ed=true;}else if($assertType(ef,BG,true)[1]||$assertType(ef,BN,true)[1]){ee=true;}else{ec=true;}if(ee){dx++;$s=27;continue;}eg=$assertType(dy.Shape,BO);ei=AI(0,0,dn,eg);$s=29;case 29:if($c){$c=false;ei=ei.$blk();}if(ei&&ei.$blk!==undefined){break s;}eh=ei;ej=eh[0];ek=eh[1];el=eh[2];em=eh[3];if(!ej){dx++;$s=27;continue;}en=em.OverlapX*0+em.OverlapY*-1;if(ed){eo=(em.Overlap-0.2)*em.OverlapX;ep=(em.Overlap-0.2)*em.OverlapY;ek=eo;el=ep;}eq=(er=dl-1>>0,((er<0||er>=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+er])).$get();es=0;while(true){if(!(es=eq.$length)?($throwRuntimeError("index out of range"),undefined):eq.$array[eq.$offset+es]),C);eu=ek*et.X+el*et.Y;if(ec||(ed&&0>eu)){ek=ek-(eu*et.X);el=el-(eu*et.Y);}es++;}ev=dl-1>>0;((ev<0||ev>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+ev]).X=((ev<0||ev>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+ev]).X+(ek);ew=dl-1>>0;((ew<0||ew>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+ew]).Y=((ew<0||ew>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+ew]).Y+(el);if(0.5=dk.VelY;if(ex){dp.VelY=0;dp.VelX=0;if(8===dp.CharacterState){dp.CharacterState=9;dp.FramesToRecover=dt.LayDownFramesToRecover;}else{ey=dk.CharacterState;if((ey===(8))||(ey===(4))||(ey===(5))||(ey===(16))){ez=0;fa=dk.ColliderRadius;fb=ez;fc=fa;fd=AM(fb,fc);fe=fd[1];ff=dl-1>>0;((ff<0||ff>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+ff]).Y=((ff<0||ff>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+ff]).Y-(fe);}dp.CharacterState=0;dp.FramesToRecover=0;}}else{fg=(fh=Y[$Int32.keyFor(dp.CharacterState)],fh!==undefined?[fh.v,true]:[false,false]);fi=fg[1];if(fi){if(9===dp.CharacterState){if(0===dp.FramesToRecover){dp.CharacterState=10;dp.FramesToRecover=dt.GetUpFramesToRecover;}}else if(10===dp.CharacterState){if(0===dp.FramesToRecover){dp.CharacterState=0;dp.FramesInvinsible=dt.GetUpInvinsibleFrames;}}}}}if(dt.OnWallEnabled){if(dp.InAir){fj=(fk=W[$Int32.keyFor(dk.CharacterState)],fk!==undefined?[fk.v,true]:[false,false]);fl=fj[1];if(!fl){fm=(fn=dl-1>>0,((fn<0||fn>=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+fn])).$get();fo=0;while(true){if(!(fo=fm.$length)?($throwRuntimeError("index out of range"),undefined):fm.$array[fm.$offset+fo]),C);fq=fp.X*1+fp.Y*0;fr=fp.X*-1+fp.Y*0;if(0.9>0));ft=((fp.Y>>0));dp.OnWallNormX=fs;dp.OnWallNormY=ft;break;}if(0.9>0));fv=((fp.Y>>0));dp.OnWallNormX=fu;dp.OnWallNormY=fv;break;}fo++;}if(!dk.OnWall&&dp.OnWall){dp.VelY=0;}}}if(!dp.OnWall){fw=0;fx=0;dp.OnWallNormX=fw;dp.OnWallNormY=fx;}}di++;$s=22;continue;case 23:fy=cf;fz=0;case 30:if(!(fz=fy.$length)?($throwRuntimeError("index out of range"),undefined):fy.$array[fy.$offset+fz]);gb=ga.Check(0,0,new BJ([]));ga.Space.Remove(new BX([ga]));gc=true;if(!(BK.nil===gb)){$s=32;continue;}$s=33;continue;case 32:gd=ga.Data;if($assertType(gd,BG,true)[1]){$s=34;continue;}if($assertType(gd,BN,true)[1]){$s=35;continue;}$s=36;continue;case 34:ge=gd.$val;gg=$assertType(ga.Shape,BO);gj=(gh=b.PlayersArr,gi=ge.BattleAttr.OffenderJoinIndex-1>>0,((gi<0||gi>=gh.$length)?($throwRuntimeError("index out of range"),undefined):gh.$array[gh.$offset+gi]));gk=gb.Objects;gl=0;case 37:if(!(gl=gk.$length)?($throwRuntimeError("index out of range"),undefined):gk.$array[gk.$offset+gl]);gn=$assertType(gm.Shape,BO);go=gm.Data;if($assertType(go,BM,true)[1]){$s=39;continue;}$s=40;continue;case 39:gp=go.$val;if(ge.BattleAttr.OffenderJoinIndex===gp.JoinIndex){gl++;$s=37;continue;}gs=AI(0,0,gg,gn);$s=42;case 42:if($c){$c=false;gs=gs.$blk();}if(gs&&gs.$blk!==undefined){break s;}gr=gs;gt=gr[0];if(!gt){gl++;$s=37;continue;}gc=false;gu=(gv=X[$Int32.keyFor(gp.CharacterState)],gv!==undefined?[gv.v,true]:[false,false]);gw=gu[1];if(gw){gl++;$s=37;continue;}if(0gj.DirX){gx=-gx;}gy=$imul(gx,ge.Bullet.PushbackVelX);gz=ge.Bullet.PushbackVelY;ha=gy;hb=gz;hd=(hc=gp.JoinIndex-1>>0,((hc<0||hc>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+hc]));hd.VelX=ha;hd.VelY=hb;if(ge.Bullet.BlowUp){hd.CharacterState=8;}else{hd.CharacterState=3;}hf=(he=gp.JoinIndex-1>>0,((he<0||he>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+he])).FramesToRecover;if(ge.Bullet.HitStunFrames>hf){hd.FramesToRecover=ge.Bullet.HitStunFrames;}$s=41;continue;case 40:gq=go;gc=false;case 41:gl++;$s=37;continue;case 38:$s=36;continue;case 35:gf=gd.$val;hg=$assertType(ga.Shape,BO);hj=(hh=b.PlayersArr,hi=gf.BattleAttr.OffenderJoinIndex-1>>0,((hi<0||hi>=hh.$length)?($throwRuntimeError("index out of range"),undefined):hh.$array[hh.$offset+hi]));hk=gb.Objects;hl=0;case 43:if(!(hl=hk.$length)?($throwRuntimeError("index out of range"),undefined):hk.$array[hk.$offset+hl]);hn=$assertType(hm.Shape,BO);ho=hm.Data;if($assertType(ho,BM,true)[1]){$s=45;continue;}$s=46;continue;case 45:hp=ho.$val;if(gf.BattleAttr.OffenderJoinIndex===hp.JoinIndex){hl++;$s=43;continue;}hs=AI(0,0,hg,hn);$s=48;case 48:if($c){$c=false;hs=hs.$blk();}if(hs&&hs.$blk!==undefined){break s;}hr=hs;ht=hr[0];if(!ht){hl++;$s=43;continue;}gc=false;hu=(hv=X[$Int32.keyFor(hp.CharacterState)],hv!==undefined?[hv.v,true]:[false,false]);hw=hu[1];if(hw){hl++;$s=43;continue;}if(0hj.DirX){hx=-hx;}hy=$imul(hx,gf.Bullet.PushbackVelX);hz=gf.Bullet.PushbackVelY;ia=hy;ib=hz;id=(ic=hp.JoinIndex-1>>0,((ic<0||ic>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+ic]));id.VelX=ia;id.VelY=ib;if(gf.Bullet.BlowUp){id.CharacterState=8;}else{id.CharacterState=3;}ig=(ie=hp.JoinIndex-1>>0,((ie<0||ie>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+ie])).FramesToRecover;if(gf.Bullet.HitStunFrames>ig){id.FramesToRecover=gf.Bullet.HitStunFrames;}$s=47;continue;case 46:hq=ho;gc=false;case 47:hl++;$s=43;continue;case 44:case 36:case 33:if(gc){ih=ga.Data;if($assertType(ih,BG,true)[1]){ii=ih.$val;n=$append(n,ii);}else if($assertType(ih,BN,true)[1]){ij=ih.$val;ik=ij.VirtualGridX+ij.VelX>>0;il=ij.VirtualGridY+ij.VelY>>0;ij.VirtualGridX=ik;ij.VirtualGridY=il;o=$append(o,ij);}}fz++;$s=30;continue;case 31:im=b.PlayersArr;io=0;while(true){if(!(io=im.$length)?($throwRuntimeError("index out of range"),undefined):im.$array[im.$offset+io]);ir=iq.JoinIndex;is=((ip<0||ip>=ax.$length)?($throwRuntimeError("index out of range"),undefined):ax.$array[ax.$offset+ip]);it=((ip<0||ip>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+ip]);iu=AP(is.X-(iv=ir-1>>0,((iv<0||iv>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+iv])).X,is.Y-(iw=ir-1>>0,((iw<0||iw>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+iw])).Y,is.W*0.5,is.H*0.5,0,0,0,0,e,f);it.VirtualGridX=iu[0];it.VirtualGridY=iu[1];if(it.InAir){ix=it.CharacterState;iy=ix;if((iy===(0))||(iy===(1))){if(it.OnWall){it.CharacterState=16;}else if(((ip<0||ip>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+ip])||(5===iq.CharacterState)){it.CharacterState=5;}else{it.CharacterState=4;}}else if(iy===(2)){it.CharacterState=6;}else if(iy===(3)){it.CharacterState=7;}}if(!((it.CharacterState===iq.CharacterState))){it.FramesInChState=0;}iz=(ja=Y[$Int32.keyFor(it.CharacterState)],ja!==undefined?[ja.v,true]:[false,false]);jb=iz[1];if(jb){it.ActiveSkillId=-1;it.ActiveSkillHit=-1;}io++;}jc=ax;jd=0;while(true){if(!(jd=jc.$length)?($throwRuntimeError("index out of range"),undefined):jc.$array[jc.$offset+jd]);je.Space.Remove(new BX([je]));jd++;}$s=-1;return new N.ptr(b.Id+1>>0,i,new $Int64(0,0),n,o,new $Uint64(0,0),false,s);}return;}var $f={$blk:AT,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,d,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,e,ea,eb,ec,ed,ee,ef,eg,eh,ei,ej,ek,el,em,en,eo,ep,eq,er,es,et,eu,ev,ew,ex,ey,ez,f,fa,fb,fc,fd,fe,ff,fg,fh,fi,fj,fk,fl,fm,fn,fo,fp,fq,fr,fs,ft,fu,fv,fw,fx,fy,fz,g,ga,gb,gc,gd,ge,gf,gg,gh,gi,gj,gk,gl,gm,gn,go,gp,gq,gr,gs,gt,gu,gv,gw,gx,gy,gz,h,ha,hb,hc,hd,he,hf,hg,hh,hi,hj,hk,hl,hm,hn,ho,hp,hq,hr,hs,ht,hu,hv,hw,hx,hy,hz,i,ia,ib,ic,id,ie,ig,ih,ii,ij,ik,il,im,io,ip,iq,ir,is,it,iu,iv,iw,ix,iy,iz,j,ja,jb,jc,jd,je,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame=AT;AU=function(a,b,c,d,e,f,g,h,i,j,k,l){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l});$s=$s||0;s:while(true){switch($s){case 0:m=AN(a,b,c*0.5,d*0.5,e,f,g,h,i,j);n=m[0];o=m[1];p=AV(n,o,g+c+h,f+d+e,k,l);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;$s=2;case 2:return q;}return;}var $f={$blk:AU,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s};return $f;};$pkg.GenerateRectCollider=AU;AV=function(a,b,c,d,e,f){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e,f});$s=$s||0;s:while(true){switch($s){case 0:g=B.NewObject(a,b,c,d,new BJ([f]));h=B.NewRectangle(0,0,c,d);$r=g.SetShape(h);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g.Data=e;$s=-1;return g;}return;}var $f={$blk:AV,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};AW=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=AX(a);g=0;h=0;i=g;j=h;k=B.NewConvexPolygon(BY.nil);l=f.Points;m=0;while(true){if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);p=f.Points;q=0;while(true){if(!(q=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);if(n===r){q++;continue;}if(A.Abs(s.X-o.X)>i){i=A.Abs(s.X-o.X);}if(A.Abs(s.Y-o.Y)>j){j=A.Abs(s.Y-o.Y);}q++;}m++;}t=0;while(true){if(!(t=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+t]));k.AddPoints(new BY([v.X,v.Y]));t=t+(1)>>0;}w=B.NewObject(f.Anchor.X+b,f.Anchor.Y+c,i,j,new BJ([e]));$r=w.SetShape(k);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}w.Data=d;$s=-1;return w;}return;}var $f={$blk:AW,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s};return $f;};$pkg.GenerateConvexPolygonCollider=AW;AX=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=new C.ptr(1.7e+308,1.7e+308);c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.X=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]);(k=f.Points,((i<0||i>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+i]=new C.ptr(j.X-b.X,j.Y-b.Y)));h++;}return f;};$pkg.AlignPolygon2DToBoundingBox=AX;AY=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;return new K.ptr(new J.ptr(a,b,c,t),new I.ptr(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,false));};$pkg.NewMeleeBullet=AY;AZ=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab){var a,aa,ab,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;return new L.ptr(u,v,w,x,y,z,aa,ab,new J.ptr(a,b,c,t),new I.ptr(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,false));};$pkg.NewFireballBullet=AZ;CD.methods=[{prop:"Put",name:"Put",pkg:"",typ:$funcType([$emptyInterface],[],false)},{prop:"Pop",name:"Pop",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"GetArrIdxByOffset",name:"GetArrIdxByOffset",pkg:"",typ:$funcType([$Int32],[$Int32],false)},{prop:"GetByOffset",name:"GetByOffset",pkg:"",typ:$funcType([$Int32],[$emptyInterface],false)},{prop:"GetByFrameId",name:"GetByFrameId",pkg:"",typ:$funcType([$Int32],[$emptyInterface],false)},{prop:"SetByFrameId",name:"SetByFrameId",pkg:"",typ:$funcType([$emptyInterface,$Int32],[$Int32,$Int32,$Int32],false)}];C.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""}]);D.init("",[{prop:"Anchor",name:"Anchor",embedded:false,exported:true,typ:BZ,tag:""},{prop:"Points",name:"Points",embedded:false,exported:true,typ:CA,tag:""}]);E.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridX",name:"VirtualGridX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridY",name:"VirtualGridY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirX",name:"DirX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirY",name:"DirY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelX",name:"VelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelY",name:"VelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BattleState",name:"BattleState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"JoinIndex",name:"JoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ColliderRadius",name:"ColliderRadius",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Removed",name:"Removed",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Score",name:"Score",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"LastMoveGmtMillis",name:"LastMoveGmtMillis",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesToRecover",name:"FramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesInChState",name:"FramesInChState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Hp",name:"Hp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"MaxHp",name:"MaxHp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CharacterState",name:"CharacterState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InAir",name:"InAir",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"OnWall",name:"OnWall",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"OnWallNormX",name:"OnWallNormX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OnWallNormY",name:"OnWallNormY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ActiveSkillId",name:"ActiveSkillId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ActiveSkillHit",name:"ActiveSkillHit",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesInvinsible",name:"FramesInvinsible",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BulletTeamId",name:"BulletTeamId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ChCollisionTeamId",name:"ChCollisionTeamId",embedded:false,exported:true,typ:$Int32,tag:""}]);F.init("",[{prop:"Dx",name:"Dx",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Dy",name:"Dy",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnALevel",name:"BtnALevel",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnBLevel",name:"BtnBLevel",embedded:false,exported:true,typ:$Int32,tag:""}]);H.init("",[{prop:"Boundary",name:"Boundary",embedded:false,exported:true,typ:CB,tag:""}]);I.init("",[{prop:"StartupFrames",name:"StartupFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CancellableStFrame",name:"CancellableStFrame",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CancellableEdFrame",name:"CancellableEdFrame",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ActiveFrames",name:"ActiveFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitStunFrames",name:"HitStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BlockStunFrames",name:"BlockStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PushbackVelX",name:"PushbackVelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PushbackVelY",name:"PushbackVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Damage",name:"Damage",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SelfLockVelX",name:"SelfLockVelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SelfLockVelY",name:"SelfLockVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxOffsetX",name:"HitboxOffsetX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxOffsetY",name:"HitboxOffsetY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxSizeX",name:"HitboxSizeX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxSizeY",name:"HitboxSizeY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BlowUp",name:"BlowUp",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"CancelTransit",name:"CancelTransit",embedded:false,exported:true,typ:CC,tag:""}]);J.init("",[{prop:"BulletLocalId",name:"BulletLocalId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OriginatedRenderFrameId",name:"OriginatedRenderFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OffenderJoinIndex",name:"OffenderJoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"TeamId",name:"TeamId",embedded:false,exported:true,typ:$Int32,tag:""}]);K.init("",[{prop:"BattleAttr",name:"BattleAttr",embedded:false,exported:true,typ:BD,tag:""},{prop:"Bullet",name:"Bullet",embedded:false,exported:true,typ:BE,tag:""}]);L.init("",[{prop:"VirtualGridX",name:"VirtualGridX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridY",name:"VirtualGridY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirX",name:"DirX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirY",name:"DirY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelX",name:"VelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelY",name:"VelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SpeciesId",name:"SpeciesId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BattleAttr",name:"BattleAttr",embedded:false,exported:true,typ:BD,tag:""},{prop:"Bullet",name:"Bullet",embedded:false,exported:true,typ:BE,tag:""}]);M.init("",[{prop:"BattleLocalId",name:"BattleLocalId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFrames",name:"RecoveryFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnBlock",name:"RecoveryFramesOnBlock",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnHit",name:"RecoveryFramesOnHit",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ReleaseTriggerType",name:"ReleaseTriggerType",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BoundChState",name:"BoundChState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Hits",name:"Hits",embedded:false,exported:true,typ:BC,tag:""}]);N.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PlayersArr",name:"PlayersArr",embedded:false,exported:true,typ:BR,tag:""},{prop:"CountdownNanos",name:"CountdownNanos",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"MeleeBullets",name:"MeleeBullets",embedded:false,exported:true,typ:BS,tag:""},{prop:"FireballBullets",name:"FireballBullets",embedded:false,exported:true,typ:BT,tag:""},{prop:"BackendUnconfirmedMask",name:"BackendUnconfirmedMask",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"ShouldForceResync",name:"ShouldForceResync",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"BulletLocalIdCounter",name:"BulletLocalIdCounter",embedded:false,exported:true,typ:$Int32,tag:""}]);O.init("",[{prop:"InputFrameId",name:"InputFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InputList",name:"InputList",embedded:false,exported:true,typ:BQ,tag:""},{prop:"ConfirmedList",name:"ConfirmedList",embedded:false,exported:true,typ:$Uint64,tag:""}]);P.init("",[{prop:"FlAct",name:"FlAct",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"FrAct",name:"FrAct",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""}]);Q.init("",[{prop:"Ed",name:"Ed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"St",name:"St",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"EdFrameId",name:"EdFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"StFrameId",name:"StFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"N",name:"N",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Cnt",name:"Cnt",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Eles",name:"Eles",embedded:false,exported:true,typ:BC,tag:""}]);S.init([$Int,BM],[$Int],false);T.init("",[{prop:"SpeciesId",name:"SpeciesId",embedded:false,exported:true,typ:$Int,tag:""},{prop:"SpeciesName",name:"SpeciesName",embedded:false,exported:true,typ:$String,tag:""},{prop:"InAirIdleFrameIdxTurningPoint",name:"InAirIdleFrameIdxTurningPoint",embedded:false,exported:true,typ:$Int,tag:""},{prop:"InAirIdleFrameIdxTurnedCycle",name:"InAirIdleFrameIdxTurnedCycle",embedded:false,exported:true,typ:$Int,tag:""},{prop:"LayDownFrames",name:"LayDownFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"LayDownFramesToRecover",name:"LayDownFramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"GetUpInvinsibleFrames",name:"GetUpInvinsibleFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"GetUpFramesToRecover",name:"GetUpFramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"JumpingInitVelY",name:"JumpingInitVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DashingEnabled",name:"DashingEnabled",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"OnWallEnabled",name:"OnWallEnabled",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"WallJumpingFramesToRecover",name:"WallJumpingFramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"WallJumpingInitVelX",name:"WallJumpingInitVelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"WallJumpingInitVelY",name:"WallJumpingInitVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"WallSlidingVelY",name:"WallSlidingVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SkillMapper",name:"SkillMapper",embedded:false,exported:true,typ:S,tag:""}]);AH.init("",[{prop:"Overlap",name:"Overlap",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapX",name:"OverlapX",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapY",name:"OverlapY",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"AContainedInB",name:"AContainedInB",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"BContainedInA",name:"BContainedInA",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Axis",name:"Axis",embedded:false,exported:true,typ:B.Vector,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.DIRECTION_DECODER=new BB([new BA([0,0]),new BA([0,2]),new BA([0,-2]),new BA([2,0]),new BA([-2,0]),new BA([1,1]),new BA([-1,-1]),new BA([1,-1]),new BA([-1,1])]);U=$makeMap($Int.keyFor,[{k:1,v:new M.ptr(0,30,30,30,1,2,new BC([new K.ptr(BD.nil,new I.ptr(7,13,30,22,13,9,50,0,5,5,-1,1200,0,2400,3200,false,$makeMap($Int.keyFor,[{k:1,v:2}])))]))},{k:2,v:new M.ptr(0,36,36,36,1,11,new BC([new K.ptr(BD.nil,new I.ptr(18,22,36,18,18,9,50,0,5,10,-1,1800,0,2400,3200,false,$makeMap($Int.keyFor,[{k:1,v:3}])))]))},{k:3,v:new M.ptr(0,50,50,50,1,12,new BC([new K.ptr(BD.nil,new I.ptr(8,0,0,30,999999999,9,200,700,10,50,500,1600,800,3200,3200,true,false))]))},{k:4,v:new M.ptr(0,30,30,30,1,2,new BC([new K.ptr(BD.nil,new I.ptr(7,13,30,22,13,9,50,0,5,5,-1,1200,0,2400,3200,false,$makeMap($Int.keyFor,[{k:1,v:5}])))]))},{k:5,v:new M.ptr(0,36,36,36,1,11,new BC([new K.ptr(BD.nil,new I.ptr(18,22,36,18,18,9,50,0,5,10,-1,1800,0,2400,3200,false,$makeMap($Int.keyFor,[{k:1,v:6}])))]))},{k:6,v:new M.ptr(0,45,45,45,1,12,new BC([new K.ptr(BD.nil,new I.ptr(8,0,0,28,999999999,9,200,300,10,-1,-1,2400,0,3200,3200,true,false))]))},{k:7,v:new M.ptr(0,30,30,30,1,2,new BC([new K.ptr(BD.nil,new I.ptr(7,13,30,22,13,9,50,0,5,-1,-1,1200,0,2400,3200,false,$makeMap($Int.keyFor,[{k:1,v:8}])))]))},{k:8,v:new M.ptr(0,36,36,36,1,11,new BC([new K.ptr(BD.nil,new I.ptr(18,22,36,18,18,9,50,0,5,10,-1,1800,0,2400,3200,false,$makeMap($Int.keyFor,[{k:1,v:9}])))]))},{k:9,v:new M.ptr(0,40,40,40,1,12,new BC([new K.ptr(BD.nil,new I.ptr(7,0,0,30,999999999,9,200,400,10,100,-1,1000,0,3200,3200,true,false))]))},{k:10,v:new M.ptr(0,40,40,40,1,13,new BC([new L.ptr(0,0,0,0,0,0,500,1,BD.nil,new I.ptr(15,0,0,999999999,15,9,200,0,20,-1,-1,1800,500,4800,3200,false,false))]))},{k:11,v:new M.ptr(0,60,60,60,1,14,new BC([new K.ptr(BD.nil,new I.ptr(3,0,0,25,999999999,9,200,700,30,100,800,800,0,4000,6400,true,false))]))},{k:255,v:new M.ptr(0,30,30,30,1,6,new BC([new K.ptr(BD.nil,new I.ptr(3,0,0,20,18,9,50,0,5,-1,-1,1200,0,3200,2400,false,false))]))},{k:256,v:new M.ptr(0,20,20,20,1,6,new BC([new K.ptr(BD.nil,new I.ptr(3,0,0,10,15,9,50,0,5,-1,-1,1200,0,3200,2400,false,false))]))},{k:257,v:new M.ptr(0,30,30,30,1,6,new BC([new K.ptr(BD.nil,new I.ptr(3,0,0,20,18,9,50,0,5,-1,-1,1200,0,3200,2400,false,false))]))}]);$pkg.Characters=$makeMap($Int.keyFor,[{k:0,v:new T.ptr(0,"MonkGirl",11,1,16,16,10,27,300,800,false,false,0,0,0,0,(function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;if(1===a){if(0===b.FramesToRecover){if(b.InAir){return 255;}else{return 1;}}else{c=(d=U[$Int.keyFor(((b.ActiveSkillId>>0)))],d!==undefined?[d.v,true]:[BF.nil,false]);e=c[0];f=c[1];if(f){g=(h=e.Hits,i=b.ActiveSkillHit,((i<0||i>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]));if($assertType(g,BG,true)[1]){j=g.$val;if(j.Bullet.CancellableStFrame<=b.FramesInChState&&b.FramesInChState>0)))],d!==undefined?[d.v,true]:[BF.nil,false]);e=c[0];f=c[1];if(f){g=(h=e.Hits,i=b.ActiveSkillHit,((i<0||i>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]));if($assertType(g,BG,true)[1]){j=g.$val;if(j.Bullet.CancellableStFrame<=b.FramesInChState&&b.FramesInChState>0)))],d!==undefined?[d.v,true]:[BF.nil,false]);e=c[0];f=c[1];if(f){g=(h=e.Hits,i=b.ActiveSkillHit,((i<0||i>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]));if($assertType(g,BG,true)[1]){j=g.$val;if(j.Bullet.CancellableStFrame<=b.FramesInChState&&b.FramesInChState=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);g=A.MakeFullWrapper(f);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}c=$append(c,g);e++;$s=1;continue;case 2:$s=-1;return c;}return;}var $f={$blk:O,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};$pkg.GetCollisionSpaceObjsJs=O;P=function(a,b,c,d,e,f,g,h){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h});$s=$s||0;s:while(true){switch($s){case 0:i=0.1;j=0.1;k=0.1;l=0.1;m=i;n=j;o=k;p=l;q=B.GenerateRectCollider(a,b,c,d,m,n,o,p,e,f,g,h);$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=A.MakeFullWrapper(q);$s=2;case 2:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=r;$s=3;case 3:return s;}return;}var $f={$blk:P,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};$pkg.GenerateRectColliderJs=P;Q=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=B.GenerateConvexPolygonCollider(a,b,c,d,e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=A.MakeFullWrapper(f);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=3;case 3:return h;}return;}var $f={$blk:Q,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};$pkg.GenerateConvexPolygonColliderJs=Q;R=function(a){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=$makeSlice(AF,a.$length,a.$length);c=a;d=0;case 1:if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);h=A.MakeFullWrapper((g=B.Characters[$Int.keyFor(f)],g!==undefined?g.v:AG.nil));$s=3;case 3:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}((e<0||e>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e]=h);d++;$s=1;continue;case 2:$s=-1;return b;}return;}var $f={$blk:R,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};$pkg.GetCharacterConfigsOrderedByJoinIndex=R;S=function(a,b,c,d,e,f,g){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g});$s=$s||0;s:while(true){switch($s){case 0:h=B.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(a,b,c,d,e,f,g);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=A.MakeFullWrapper(h);$s=2;case 2:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;$s=3;case 3:return j;}return;}var $f={$blk:S,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs=S;T=function(){$global.gopkgs=$externalize($makeMap($String.keyFor,[{k:"NewVec2DJs",v:new AH(G)},{k:"NewPolygon2DJs",v:new AI(H)},{k:"NewBarrierJs",v:new AJ(I)},{k:"NewPlayerDownsyncJs",v:new AK(J)},{k:"NewMeleeBulletJs",v:new AL(K)},{k:"NewFireballBulletJs",v:new AM(L)},{k:"NewNpcPatrolCue",v:new AN(M)},{k:"NewRoomDownsyncFrameJs",v:new AO(N)},{k:"NewCollisionSpaceJs",v:new AP(F)},{k:"NewInputFrameDownsync",v:new AQ(D)},{k:"NewRingBufferJs",v:new AR(E)},{k:"GenerateRectColliderJs",v:new AS(P)},{k:"GenerateConvexPolygonColliderJs",v:new AT(Q)},{k:"GetCollisionSpaceObjsJs",v:new AV(O)},{k:"WorldToPolygonColliderBLPos",v:new AW(B.WorldToPolygonColliderBLPos)},{k:"PolygonColliderBLToWorldPos",v:new AW(B.PolygonColliderBLToWorldPos)},{k:"WorldToVirtualGridPos",v:new AX(B.WorldToVirtualGridPos)},{k:"VirtualGridToWorldPos",v:new AY(B.VirtualGridToWorldPos)},{k:"GetCharacterConfigsOrderedByJoinIndex",v:new BA(R)},{k:"ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs",v:new BG(S)},{k:"ConvertToDelayedInputFrameId",v:new BH(B.ConvertToDelayedInputFrameId)},{k:"ConvertToNoDelayInputFrameId",v:new BH(B.ConvertToNoDelayInputFrameId)},{k:"ConvertToFirstUsedRenderFrameId",v:new BH(B.ConvertToFirstUsedRenderFrameId)},{k:"ConvertToLastUsedRenderFrameId",v:new BH(B.ConvertToLastUsedRenderFrameId)},{k:"ShouldGenerateInputFrameUpsync",v:new BI(B.ShouldGenerateInputFrameUpsync)}]),BJ);};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if($pkg===$mainPkg){T();$mainFinished=true;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["jsexport/battle"]=(function(){var $pkg={},$init,A,B,C,D,E,F,H,I,J,K,L,M,N,O,P,Q,S,T,AH,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,U,V,W,X,Y,R,Z,AB,AC,AD,AE,AF,AG,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AV,AW,AX,AY,AZ,BA,BB,BC,BD;A=$packages["math"];B=$packages["resolv"];C=$pkg.Vec2D=$newType(0,$kindStruct,"battle.Vec2D",true,"jsexport/battle",true,function(X_,Y_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;return;}this.X=X_;this.Y=Y_;});D=$pkg.Polygon2D=$newType(0,$kindStruct,"battle.Polygon2D",true,"jsexport/battle",true,function(Anchor_,Points_){this.$val=this;if(arguments.length===0){this.Anchor=CD.nil;this.Points=CE.nil;return;}this.Anchor=Anchor_;this.Points=Points_;});E=$pkg.PlayerDownsync=$newType(0,$kindStruct,"battle.PlayerDownsync",true,"jsexport/battle",true,function(Id_,VirtualGridX_,VirtualGridY_,DirX_,DirY_,VelX_,VelY_,Speed_,BattleState_,JoinIndex_,ColliderRadius_,Removed_,Score_,LastMoveGmtMillis_,FramesToRecover_,FramesInChState_,Hp_,MaxHp_,CharacterState_,InAir_,OnWall_,OnWallNormX_,OnWallNormY_,ActiveSkillId_,ActiveSkillHit_,FramesInvinsible_,BulletTeamId_,ChCollisionTeamId_){this.$val=this;if(arguments.length===0){this.Id=0;this.VirtualGridX=0;this.VirtualGridY=0;this.DirX=0;this.DirY=0;this.VelX=0;this.VelY=0;this.Speed=0;this.BattleState=0;this.JoinIndex=0;this.ColliderRadius=0;this.Removed=false;this.Score=0;this.LastMoveGmtMillis=0;this.FramesToRecover=0;this.FramesInChState=0;this.Hp=0;this.MaxHp=0;this.CharacterState=0;this.InAir=false;this.OnWall=false;this.OnWallNormX=0;this.OnWallNormY=0;this.ActiveSkillId=0;this.ActiveSkillHit=0;this.FramesInvinsible=0;this.BulletTeamId=0;this.ChCollisionTeamId=0;return;}this.Id=Id_;this.VirtualGridX=VirtualGridX_;this.VirtualGridY=VirtualGridY_;this.DirX=DirX_;this.DirY=DirY_;this.VelX=VelX_;this.VelY=VelY_;this.Speed=Speed_;this.BattleState=BattleState_;this.JoinIndex=JoinIndex_;this.ColliderRadius=ColliderRadius_;this.Removed=Removed_;this.Score=Score_;this.LastMoveGmtMillis=LastMoveGmtMillis_;this.FramesToRecover=FramesToRecover_;this.FramesInChState=FramesInChState_;this.Hp=Hp_;this.MaxHp=MaxHp_;this.CharacterState=CharacterState_;this.InAir=InAir_;this.OnWall=OnWall_;this.OnWallNormX=OnWallNormX_;this.OnWallNormY=OnWallNormY_;this.ActiveSkillId=ActiveSkillId_;this.ActiveSkillHit=ActiveSkillHit_;this.FramesInvinsible=FramesInvinsible_;this.BulletTeamId=BulletTeamId_;this.ChCollisionTeamId=ChCollisionTeamId_;});F=$pkg.InputFrameDecoded=$newType(0,$kindStruct,"battle.InputFrameDecoded",true,"jsexport/battle",true,function(Dx_,Dy_,BtnALevel_,BtnBLevel_){this.$val=this;if(arguments.length===0){this.Dx=0;this.Dy=0;this.BtnALevel=0;this.BtnBLevel=0;return;}this.Dx=Dx_;this.Dy=Dy_;this.BtnALevel=BtnALevel_;this.BtnBLevel=BtnBLevel_;});H=$pkg.Barrier=$newType(0,$kindStruct,"battle.Barrier",true,"jsexport/battle",true,function(Boundary_){this.$val=this;if(arguments.length===0){this.Boundary=CF.nil;return;}this.Boundary=Boundary_;});I=$pkg.BulletConfig=$newType(0,$kindStruct,"battle.BulletConfig",true,"jsexport/battle",true,function(StartupFrames_,CancellableStFrame_,CancellableEdFrame_,ActiveFrames_,HitStunFrames_,BlockStunFrames_,PushbackVelX_,PushbackVelY_,Damage_,SelfLockVelX_,SelfLockVelY_,HitboxOffsetX_,HitboxOffsetY_,HitboxSizeX_,HitboxSizeY_,BlowUp_,ExplosionFrames_,SpeciesId_,CancelTransit_){this.$val=this;if(arguments.length===0){this.StartupFrames=0;this.CancellableStFrame=0;this.CancellableEdFrame=0;this.ActiveFrames=0;this.HitStunFrames=0;this.BlockStunFrames=0;this.PushbackVelX=0;this.PushbackVelY=0;this.Damage=0;this.SelfLockVelX=0;this.SelfLockVelY=0;this.HitboxOffsetX=0;this.HitboxOffsetY=0;this.HitboxSizeX=0;this.HitboxSizeY=0;this.BlowUp=false;this.ExplosionFrames=0;this.SpeciesId=0;this.CancelTransit=false;return;}this.StartupFrames=StartupFrames_;this.CancellableStFrame=CancellableStFrame_;this.CancellableEdFrame=CancellableEdFrame_;this.ActiveFrames=ActiveFrames_;this.HitStunFrames=HitStunFrames_;this.BlockStunFrames=BlockStunFrames_;this.PushbackVelX=PushbackVelX_;this.PushbackVelY=PushbackVelY_;this.Damage=Damage_;this.SelfLockVelX=SelfLockVelX_;this.SelfLockVelY=SelfLockVelY_;this.HitboxOffsetX=HitboxOffsetX_;this.HitboxOffsetY=HitboxOffsetY_;this.HitboxSizeX=HitboxSizeX_;this.HitboxSizeY=HitboxSizeY_;this.BlowUp=BlowUp_;this.ExplosionFrames=ExplosionFrames_;this.SpeciesId=SpeciesId_;this.CancelTransit=CancelTransit_;});J=$pkg.BulletBattleAttr=$newType(0,$kindStruct,"battle.BulletBattleAttr",true,"jsexport/battle",true,function(BulletLocalId_,OriginatedRenderFrameId_,OffenderJoinIndex_,TeamId_){this.$val=this;if(arguments.length===0){this.BulletLocalId=0;this.OriginatedRenderFrameId=0;this.OffenderJoinIndex=0;this.TeamId=0;return;}this.BulletLocalId=BulletLocalId_;this.OriginatedRenderFrameId=OriginatedRenderFrameId_;this.OffenderJoinIndex=OffenderJoinIndex_;this.TeamId=TeamId_;});K=$pkg.MeleeBullet=$newType(0,$kindStruct,"battle.MeleeBullet",true,"jsexport/battle",true,function(BlState_,FramesInBlState_,BattleAttr_,Bullet_){this.$val=this;if(arguments.length===0){this.BlState=0;this.FramesInBlState=0;this.BattleAttr=BH.nil;this.Bullet=BI.nil;return;}this.BlState=BlState_;this.FramesInBlState=FramesInBlState_;this.BattleAttr=BattleAttr_;this.Bullet=Bullet_;});L=$pkg.FireballBullet=$newType(0,$kindStruct,"battle.FireballBullet",true,"jsexport/battle",true,function(VirtualGridX_,VirtualGridY_,DirX_,DirY_,VelX_,VelY_,Speed_,BlState_,FramesInBlState_,BattleAttr_,Bullet_){this.$val=this;if(arguments.length===0){this.VirtualGridX=0;this.VirtualGridY=0;this.DirX=0;this.DirY=0;this.VelX=0;this.VelY=0;this.Speed=0;this.BlState=0;this.FramesInBlState=0;this.BattleAttr=BH.nil;this.Bullet=BI.nil;return;}this.VirtualGridX=VirtualGridX_;this.VirtualGridY=VirtualGridY_;this.DirX=DirX_;this.DirY=DirY_;this.VelX=VelX_;this.VelY=VelY_;this.Speed=Speed_;this.BlState=BlState_;this.FramesInBlState=FramesInBlState_;this.BattleAttr=BattleAttr_;this.Bullet=Bullet_;});M=$pkg.Skill=$newType(0,$kindStruct,"battle.Skill",true,"jsexport/battle",true,function(BattleLocalId_,RecoveryFrames_,RecoveryFramesOnBlock_,RecoveryFramesOnHit_,ReleaseTriggerType_,BoundChState_,Hits_){this.$val=this;if(arguments.length===0){this.BattleLocalId=0;this.RecoveryFrames=0;this.RecoveryFramesOnBlock=0;this.RecoveryFramesOnHit=0;this.ReleaseTriggerType=0;this.BoundChState=0;this.Hits=BG.nil;return;}this.BattleLocalId=BattleLocalId_;this.RecoveryFrames=RecoveryFrames_;this.RecoveryFramesOnBlock=RecoveryFramesOnBlock_;this.RecoveryFramesOnHit=RecoveryFramesOnHit_;this.ReleaseTriggerType=ReleaseTriggerType_;this.BoundChState=BoundChState_;this.Hits=Hits_;});N=$pkg.RoomDownsyncFrame=$newType(0,$kindStruct,"battle.RoomDownsyncFrame",true,"jsexport/battle",true,function(Id_,PlayersArr_,CountdownNanos_,MeleeBullets_,FireballBullets_,BackendUnconfirmedMask_,ShouldForceResync_,BulletLocalIdCounter_){this.$val=this;if(arguments.length===0){this.Id=0;this.PlayersArr=BV.nil;this.CountdownNanos=new $Int64(0,0);this.MeleeBullets=BW.nil;this.FireballBullets=BX.nil;this.BackendUnconfirmedMask=new $Uint64(0,0);this.ShouldForceResync=false;this.BulletLocalIdCounter=0;return;}this.Id=Id_;this.PlayersArr=PlayersArr_;this.CountdownNanos=CountdownNanos_;this.MeleeBullets=MeleeBullets_;this.FireballBullets=FireballBullets_;this.BackendUnconfirmedMask=BackendUnconfirmedMask_;this.ShouldForceResync=ShouldForceResync_;this.BulletLocalIdCounter=BulletLocalIdCounter_;});O=$pkg.InputFrameDownsync=$newType(0,$kindStruct,"battle.InputFrameDownsync",true,"jsexport/battle",true,function(InputFrameId_,InputList_,ConfirmedList_){this.$val=this;if(arguments.length===0){this.InputFrameId=0;this.InputList=BU.nil;this.ConfirmedList=new $Uint64(0,0);return;}this.InputFrameId=InputFrameId_;this.InputList=InputList_;this.ConfirmedList=ConfirmedList_;});P=$pkg.NpcPatrolCue=$newType(0,$kindStruct,"battle.NpcPatrolCue",true,"jsexport/battle",true,function(FlAct_,FrAct_,X_,Y_){this.$val=this;if(arguments.length===0){this.FlAct=new $Uint64(0,0);this.FrAct=new $Uint64(0,0);this.X=0;this.Y=0;return;}this.FlAct=FlAct_;this.FrAct=FrAct_;this.X=X_;this.Y=Y_;});Q=$pkg.RingBuffer=$newType(0,$kindStruct,"battle.RingBuffer",true,"jsexport/battle",true,function(Ed_,St_,EdFrameId_,StFrameId_,N_,Cnt_,Eles_){this.$val=this;if(arguments.length===0){this.Ed=0;this.St=0;this.EdFrameId=0;this.StFrameId=0;this.N=0;this.Cnt=0;this.Eles=BG.nil;return;}this.Ed=Ed_;this.St=St_;this.EdFrameId=EdFrameId_;this.StFrameId=StFrameId_;this.N=N_;this.Cnt=Cnt_;this.Eles=Eles_;});S=$pkg.SkillMapperType=$newType(4,$kindFunc,"battle.SkillMapperType",true,"jsexport/battle",true,null);T=$pkg.CharacterConfig=$newType(0,$kindStruct,"battle.CharacterConfig",true,"jsexport/battle",true,function(SpeciesId_,SpeciesName_,InAirIdleFrameIdxTurningPoint_,InAirIdleFrameIdxTurnedCycle_,LayDownFrames_,LayDownFramesToRecover_,GetUpInvinsibleFrames_,GetUpFramesToRecover_,Speed_,JumpingInitVelY_,DashingEnabled_,OnWallEnabled_,WallJumpingFramesToRecover_,WallJumpingInitVelX_,WallJumpingInitVelY_,WallSlidingVelY_,SkillMapper_){this.$val=this;if(arguments.length===0){this.SpeciesId=0;this.SpeciesName="";this.InAirIdleFrameIdxTurningPoint=0;this.InAirIdleFrameIdxTurnedCycle=0;this.LayDownFrames=0;this.LayDownFramesToRecover=0;this.GetUpInvinsibleFrames=0;this.GetUpFramesToRecover=0;this.Speed=0;this.JumpingInitVelY=0;this.DashingEnabled=false;this.OnWallEnabled=false;this.WallJumpingFramesToRecover=0;this.WallJumpingInitVelX=0;this.WallJumpingInitVelY=0;this.WallSlidingVelY=0;this.SkillMapper=$throwNilPointerError;return;}this.SpeciesId=SpeciesId_;this.SpeciesName=SpeciesName_;this.InAirIdleFrameIdxTurningPoint=InAirIdleFrameIdxTurningPoint_;this.InAirIdleFrameIdxTurnedCycle=InAirIdleFrameIdxTurnedCycle_;this.LayDownFrames=LayDownFrames_;this.LayDownFramesToRecover=LayDownFramesToRecover_;this.GetUpInvinsibleFrames=GetUpInvinsibleFrames_;this.GetUpFramesToRecover=GetUpFramesToRecover_;this.Speed=Speed_;this.JumpingInitVelY=JumpingInitVelY_;this.DashingEnabled=DashingEnabled_;this.OnWallEnabled=OnWallEnabled_;this.WallJumpingFramesToRecover=WallJumpingFramesToRecover_;this.WallJumpingInitVelX=WallJumpingInitVelX_;this.WallJumpingInitVelY=WallJumpingInitVelY_;this.WallSlidingVelY=WallSlidingVelY_;this.SkillMapper=SkillMapper_;});AH=$pkg.SatResult=$newType(0,$kindStruct,"battle.SatResult",true,"jsexport/battle",true,function(Overlap_,OverlapX_,OverlapY_,AContainedInB_,BContainedInA_,Axis_){this.$val=this;if(arguments.length===0){this.Overlap=0;this.OverlapX=0;this.OverlapY=0;this.AContainedInB=false;this.BContainedInA=false;this.Axis=B.Vector.nil;return;}this.Overlap=Overlap_;this.OverlapX=OverlapX_;this.OverlapY=OverlapY_;this.AContainedInB=AContainedInB_;this.BContainedInA=BContainedInA_;this.Axis=Axis_;});BE=$sliceType($Int32);BF=$sliceType(BE);BG=$sliceType($emptyInterface);BH=$ptrType(J);BI=$ptrType(I);BJ=$ptrType(M);BK=$ptrType(K);BL=$ptrType(AH);BM=$sliceType(C);BN=$sliceType($String);BO=$ptrType(B.Collision);BP=$ptrType(BM);BQ=$ptrType(E);BR=$ptrType(L);BS=$ptrType(B.ConvexPolygon);BT=$ptrType(O);BU=$sliceType($Uint64);BV=$sliceType(BQ);BW=$sliceType(BK);BX=$sliceType(BR);BY=$sliceType(BP);BZ=$sliceType($Bool);CA=$ptrType(B.Object);CB=$sliceType(CA);CC=$sliceType($Float64);CD=$ptrType(C);CE=$sliceType(CD);CF=$ptrType(D);CG=$mapType($Int,$Int);CH=$ptrType(Q);R=function(a){var a;return new Q.ptr(0,0,0,0,a,0,$makeSlice(BG,a));};$pkg.NewRingBuffer=R;Q.ptr.prototype.Put=function(a){var a,b,c,d;b=this;while(true){if(!(0=b.N)){break;}b.Pop();}(c=b.Eles,d=b.Ed,((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]=a));b.EdFrameId=b.EdFrameId+(1)>>0;b.Cnt=b.Cnt+(1)>>0;b.Ed=b.Ed+(1)>>0;if(b.Ed>=b.N){b.Ed=b.Ed-(b.N)>>0;}};Q.prototype.Put=function(a){return this.$val.Put(a);};Q.ptr.prototype.Pop=function(){var a,b,c,d;a=this;if(0===a.Cnt){return $ifaceNil;}d=(b=a.Eles,c=a.St,((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]));a.StFrameId=a.StFrameId+(1)>>0;a.Cnt=a.Cnt-(1)>>0;a.St=a.St+(1)>>0;if(a.St>=a.N){a.St=a.St-(a.N)>>0;}return d;};Q.prototype.Pop=function(){return this.$val.Pop();};Q.ptr.prototype.GetArrIdxByOffset=function(a){var a,b,c;b=this;if((0===b.Cnt)||0>a){return-1;}c=b.St+a>>0;if(b.St=b.N){c=c-(b.N)>>0;}if(c>=b.St||c=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+c]));};Q.prototype.GetByOffset=function(a){return this.$val.GetByOffset(a);};Q.ptr.prototype.GetByFrameId=function(a){var a,b;b=this;if(a>=b.EdFrameId||a>0);};Q.prototype.GetByFrameId=function(a){return this.$val.GetByFrameId(a);};Q.ptr.prototype.SetByFrameId=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;c=this;d=c.StFrameId;e=c.EdFrameId;f=d;g=e;if(bb){h=c.GetArrIdxByOffset(b-c.StFrameId>>0);if(!((-1===h))){(i=c.Eles,((h<0||h>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+h]=a));return[0,f,g];}}j=0;if(g>0))>>2>>0);};$pkg.ConvertToDelayedInputFrameId=AC;AD=function(a){var a;return(a>>2>>0);};$pkg.ConvertToNoDelayInputFrameId=AD;AE=function(a){var a;return(((a<<2>>0))+4>>0);};$pkg.ConvertToFirstUsedRenderFrameId=AE;AF=function(a){var a;return(((((a<<2>>0))+4>>0)+4>>0)-1>>0);};$pkg.ConvertToLastUsedRenderFrameId=AF;AG=function(a){var a,b,c,d,e,f,g,h;b=new $Uint64(a.$high&0,(a.$low&15)>>>0);d=(((c=$shiftRightUint64(a,4),new $Uint64(c.$high&0,(c.$low&1)>>>0)).$low>>0));f=(((e=$shiftRightUint64(a,5),new $Uint64(e.$high&0,(e.$low&1)>>>0)).$low>>0));return new F.ptr((g=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])),(h=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])),d,f);};AI=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];e=[e];f=[f];g=c[0].Position();e[0]=g[0];f[0]=g[1];$deferred.push([(function(c,e,f){return function(){c[0].SetPosition(e[0],f[0]);};})(c,e,f),[]]);c[0].SetPosition(e[0]+a,f[0]+b);h=new AH.ptr(0,0,0,true,true,new B.Vector([0,0]));i=AJ(c[0],d,h);if(i){$s=1;continue;}$s=2;continue;case 1:j=h.Overlap*h.OverlapX;k=h.Overlap*h.OverlapY;l=j;m=k;n=[true,l,m,h];$s=4;case 4:return n;case 2:o=[false,0,0,h];$s=5;case 5:return o;case 3:$s=-1;return[false,0,0,BL.nil];}return;}}catch(err){$err=err;$s=-1;return[false,0,0,BL.nil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:AI,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred};return $f;}}};AJ=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;d=a.Points.$length;e=b.Points.$length;f=d;g=e;if((1===f)&&(1===g)){if(!(BL.nil===c)){c.Overlap=0;}return((h=(i=a.Points,(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])),(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))===(j=(k=b.Points,(0>=k.$length?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+0])),(0>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+0])))&&((l=(m=a.Points,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0])),(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1]))===(n=(o=b.Points,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0])),(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1])));}if(1=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);if(AO(a,b,r.Unit(),c)){return false;}q++;}}if(1=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]);if(AO(a,b,u.Unit(),c)){return false;}t++;}}return true;};AK=function(a,b){var a,b;if(2===a.BlState){return false;}return((a.BattleAttr.OriginatedRenderFrameId+a.Bullet.StartupFrames>>0)<=b.Id)&&(((a.BattleAttr.OriginatedRenderFrameId+a.Bullet.StartupFrames>>0)+a.Bullet.ActiveFrames>>0)>b.Id);};$pkg.IsMeleeBulletActive=AK;AL=function(a,b){var a,b;if(2===a.BlState){return a.FramesInBlState>0)+a.Bullet.ActiveFrames>>0)>b.Id;};$pkg.IsMeleeBulletAlive=AL;AM=function(a,b){var a,b;if(2===a.BlState){return false;}return((a.BattleAttr.OriginatedRenderFrameId+a.Bullet.StartupFrames>>0)>0)+a.Bullet.ActiveFrames>>0)>b.Id);};$pkg.IsFireballBulletActive=AM;AN=function(a,b){var a,b;if(2===a.BlState){return a.FramesInBlState>0)+a.Bullet.ActiveFrames>>0)>b.Id;};$pkg.IsFireballBulletAlive=AN;AO=function(a,b,c,d){var a,aa,ab,ac,ad,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=1.7e+308;f=-1.7e+308;g=1.7e+308;h=-1.7e+308;i=e;j=f;k=g;l=h;m=a.Points;n=0;while(true){if(!(n=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]);p=((0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0])+a.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+1])+a.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(i>p){i=p;}if(j=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]);t=((0>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+0])+b.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1])+b.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(k>t){k=t;}if(ll||jl){u=i-l;d.AContainedInB=false;}else{x=j-k;y=l-i;if(x=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0])))&&(0===(ac=d.Axis,(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))))||z>aa){ad=1;if(u<0){ad=-1;}d.Overlap=aa;d.OverlapX=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])*ad;d.OverlapY=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1])*ad;}d.Axis=c;}return false;};AP=function(a,b){var a,b,c,d;c=((A.Round(a*100)>>0));d=((A.Round(b*100)>>0));return[c,d];};$pkg.WorldToVirtualGridPos=AP;AQ=function(a,b){var a,b,c,d;c=(a)*0.01;d=(b)*0.01;return[c,d];};$pkg.VirtualGridToWorldPos=AQ;AR=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a-c-g+i,b-d-f+j];};$pkg.WorldToPolygonColliderBLPos=AR;AS=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a+c+g-i,b+d+f-j];};$pkg.PolygonColliderBLToWorldPos=AS;AT=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j,k,l,m;k=AS(a,b,c,d,e,f,g,h,i,j);l=k[0];m=k[1];return AP(l,m);};$pkg.PolygonColliderBLToVirtualGridPos=AT;AV=function(a,b,c,d,e,f,g){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g});$s=$s||0;s:while(true){switch($s){case 0:h=[h];h[0]=$makeSlice(BM,0,10);i=0;if((16===b.CharacterState)&&(0===c.VelX)&&(b.DirX===c.DirX)){j=1;if(0>c.DirX){j=-j;}i=j*(b.Speed)*0.01;}k=d.Check(i,0,new BN([]));if(BO.nil===k){$s=-1;return(h.$ptr||(h.$ptr=new BP(function(){return this.$target[0];},function($v){this.$target[0]=$v;},h)));}l=k.Objects;m=0;case 1:if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);o=false;p=n.Data;if($assertType(p,BQ,true)[1]||$assertType(p,BK,true)[1]||$assertType(p,BR,true)[1]){}else{o=true;}if(!o){m++;$s=1;continue;}q=$assertType(n.Shape,BS);s=AI(0,0,e,q);$s=3;case 3:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;t=r[0];u=r[1];v=r[2];w=r[3];if(!t){m++;$s=1;continue;}x=(w.Overlap-f)*w.OverlapX;y=(w.Overlap-f)*w.OverlapY;u=x;v=y;h[0]=$append(h[0],new C.ptr(w.OverlapX,w.OverlapY));g.X=g.X+(u);g.Y=g.Y+(v);m++;$s=1;continue;case 2:$s=-1;return(h.$ptr||(h.$ptr=new BP(function(){return this.$target[0];},function($v){this.$target[0]=$v;},h)));}return;}var $f={$blk:AV,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s};return $f;};AW=function(a,b,c,d){var a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=AC(c.Id);f=AC(c.Id-1>>0);if(0>=e){return[-2,false,0,0];}g=(h=W[$Int32.keyFor(a.CharacterState)],h!==undefined?[h.v,true]:[false,false]);i=g[1];if(i){return[-2,false,0,0];}j=$assertType(d.GetByFrameId(e),BT).InputList;k=BU.nil;if(0>0,((n<0||n>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+n])));p=0;q=0;r=p;s=q;t=0;u=0;v=t;w=u;if(!(BU.nil===k)){y=AG((x=m-1>>0,((x<0||x>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+x])));v=y.BtnALevel;w=y.BtnBLevel;}if(0===a.FramesToRecover){z=o.Dx;aa=o.Dy;r=z;s=aa;if(o.BtnBLevel>w){ab=(ac=V[$Int32.keyFor(a.CharacterState)],ac!==undefined?[ac.v,true]:[false,false]);ad=ab[1];if(!ad){l=true;}else if(16===a.CharacterState){l=true;}}}ae=-1;if(o.BtnALevel>v){if(0>s){ae=3;}else if(0=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]);((l<0||l>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+l]=new E.ptr(m.Id,m.VirtualGridX,m.VirtualGridY,m.DirX,m.DirY,m.VelX,m.VelY,m.Speed,m.BattleState,m.JoinIndex,m.ColliderRadius,m.Removed,m.Score,0,m.FramesToRecover-1>>0,m.FramesInChState+1>>0,m.Hp,m.MaxHp,m.CharacterState,true,false,m.OnWallNormX,m.OnWallNormY,m.ActiveSkillId,m.ActiveSkillHit,m.FramesInvinsible-1>>0,0,0));if(((l<0||l>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+l]).FramesToRecover<0){((l<0||l>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+l]).FramesToRecover=0;}if(((l<0||l>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+l]).FramesInvinsible<0){((l<0||l>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+l]).FramesInvinsible=0;}k++;}n=$makeSlice(BW,0,b.MeleeBullets.$length);o=$makeSlice(BX,0,b.FireballBullets.$length);p=$makeSlice(BM,h);q=$makeSlice(BY,h);r=$makeSlice(BZ,h);s=b.BulletLocalIdCounter;t=b.PlayersArr;u=0;case 1:if(!(u=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+u]);z=((x<0||x>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+x]);aa=((x<0||x>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+x]);ab=AW(y,aa,b,a);ac=ab[0];ad=ab[1];ae=ab[2];af=ab[3];((x<0||x>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+x]=ad);ag=y.JoinIndex;ah=z.SkillMapper(ac,y);$s=3;case 3:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ai=ah;aj=(ak=U[$Int.keyFor(ai)],ak!==undefined?[ak.v,true]:[BJ.nil,false]);al=aj[0];am=aj[1];if(am){aa.ActiveSkillId=((ai>>0));aa.ActiveSkillHit=0;aa.FramesToRecover=al.RecoveryFrames;an=1;if(0>aa.DirX){an=-an;}ao=false;ap=(aq=al.Hits,ar=aa.ActiveSkillHit,((ar<0||ar>=aq.$length)?($throwRuntimeError("index out of range"),undefined):aq.$array[aq.$offset+ar]));if($assertType(ap,BK,true)[1]){as=ap.$val;v[0]=$clone(as,K);v[0].BattleAttr=new J.ptr(s,b.Id,ag,y.BulletTeamId);s=s+(1)>>0;v[0].BlState=0;n=$append(n,v[0]);if(!((-1===as.Bullet.SelfLockVelX))){ao=true;aa.VelX=$imul(an,as.Bullet.SelfLockVelX);}if(!((-1===as.Bullet.SelfLockVelY))){ao=true;aa.VelY=as.Bullet.SelfLockVelY;}}else if($assertType(ap,BR,true)[1]){at=ap.$val;w[0]=$clone(at,L);w[0].BattleAttr=new J.ptr(s,b.Id,ag,y.BulletTeamId);s=s+(1)>>0;au=y.VirtualGridX+($imul(an,w[0].Bullet.HitboxOffsetX))>>0;av=y.VirtualGridY+w[0].Bullet.HitboxOffsetY>>0;w[0].VirtualGridX=au;w[0].VirtualGridY=av;w[0].DirX=an;w[0].DirY=0;w[0].VelX=$imul(w[0].Speed,an);w[0].VelY=0;w[0].BlState=0;o=$append(o,w[0]);if(!((-1===at.Bullet.SelfLockVelX))){ao=true;aa.VelX=$imul(an,at.Bullet.SelfLockVelX);}if(!((-1===at.Bullet.SelfLockVelY))){ao=true;aa.VelY=at.Bullet.SelfLockVelY;}}if(false===ao&&false===y.InAir){aa.VelX=0;}aa.CharacterState=al.BoundChState;u++;$s=1;continue;}if(0===y.FramesToRecover){if(!((0===ae))){aw=1;if(0>ae){aw=-aw;}aa.DirX=ae;aa.DirY=af;aa.VelX=$imul(aw,y.Speed);if(Z(aa.VelX)=ay.$length)?($throwRuntimeError("index out of range"),undefined):ay.$array[ay.$offset+az]);bc=bb.JoinIndex;bd=0;be=0;(bf=bc-1>>0,((bf<0||bf>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+bf])).X=bd;(bg=bc-1>>0,((bg<0||bg>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+bg])).Y=be;bh=((ba<0||ba>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+ba]);bi=((ba<0||ba>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+ba]);bj=bb.VirtualGridX+bb.VelX>>0;bk=bb.VirtualGridY+bb.VelY>>0;bl=bj;bm=bk;if(((ba<0||ba>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+ba])){if(16===bb.CharacterState){if(0<($imul(bb.VelX,bb.OnWallNormX))){bl=bl-(bb.VelX)>>0;}bn=-1;if(0>bb.OnWallNormX){bn=-bn;}bl=bl+(($imul(bn,bi.WallJumpingInitVelX)))>>0;bm=bm+(bi.WallJumpingInitVelY)>>0;bh.VelX=(($imul(bn,bi.WallJumpingInitVelX)));bh.VelY=(bi.WallJumpingInitVelY);bh.FramesToRecover=bi.WallJumpingFramesToRecover;}else{bh.VelY=(bi.JumpingInitVelY);bm=bm+(bi.JumpingInitVelY)>>0;}}bo=AQ(bl,bm);bp=bo[0];bq=bo[1];br=$imul(bb.ColliderRadius,2);bs=$imul(bb.ColliderRadius,4);bt=br;bu=bs;bv=bb.CharacterState;if(bv===(9)){bw=$imul(bb.ColliderRadius,4);bx=$imul(bb.ColliderRadius,2);bt=bw;bu=bx;}else if((bv===(8))||(bv===(4))||(bv===(5))||(bv===(16))){by=$imul(bb.ColliderRadius,2);bz=$imul(bb.ColliderRadius,2);bt=by;bu=bz;}ca=AQ(bt,bu);cb=ca[0];cc=ca[1];cd=AY(bp,bq,cb,cc,0.1,0.1,0.1,0.1,e,f,bb,"Player");$s=6;case 6:if($c){$c=false;cd=cd.$blk();}if(cd&&cd.$blk!==undefined){break s;}ce=cd;((ba<0||ba>=ax.$length)?($throwRuntimeError("index out of range"),undefined):ax.$array[ax.$offset+ba]=ce);$r=c.Add(new CB([ce]));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(bb.InAir){if((16===bb.CharacterState)&&!((ba<0||ba>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+ba])){bh.VelX=bh.VelX+(0)>>0;bh.VelY=bi.WallSlidingVelY;}else{bh.VelX=bh.VelX+(0)>>0;bh.VelY=bh.VelY+(-50)>>0;}}az++;$s=4;continue;case 5:cf=$makeSlice(CB,0,b.MeleeBullets.$length);cg=b.MeleeBullets;ch=0;case 8:if(!(ch=cg.$length)?($throwRuntimeError("index out of range"),undefined):cg.$array[cg.$offset+ch]);cj=new K.ptr(ci.BlState,ci.FramesInBlState+1>>0,ci.BattleAttr,ci.Bullet);if(AL(cj,b)){$s=10;continue;}$s=11;continue;case 10:if(AK(cj,b)){$s=12;continue;}$s=13;continue;case 12:cm=(ck=b.PlayersArr,cl=cj.BattleAttr.OffenderJoinIndex-1>>0,((cl<0||cl>=ck.$length)?($throwRuntimeError("index out of range"),undefined):ck.$array[ck.$offset+cl]));cn=1;if(0>cm.DirX){cn=-cn;}co=AQ(cm.VirtualGridX+($imul(cn,cj.Bullet.HitboxOffsetX))>>0,cm.VirtualGridY);cp=co[0];cq=co[1];cr=AQ(cj.Bullet.HitboxSizeX,cj.Bullet.HitboxSizeY);cs=cr[0];ct=cr[1];cu=AY(cp,cq,cs,ct,0.1,0.1,0.1,0.1,e,f,cj,"MeleeBullet");$s=14;case 14:if($c){$c=false;cu=cu.$blk();}if(cu&&cu.$blk!==undefined){break s;}cv=cu;$r=c.Add(new CB([cv]));$s=15;case 15:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}cf=$append(cf,cv);cj.BlState=1;if(!((cj.BlState===ci.BlState))){cj.FramesInBlState=0;}case 13:n=$append(n,cj);case 11:ch++;$s=8;continue;case 9:cw=b.FireballBullets;cx=0;case 16:if(!(cx=cw.$length)?($throwRuntimeError("index out of range"),undefined):cw.$array[cw.$offset+cx]);cz=new L.ptr(cy.VirtualGridX,cy.VirtualGridY,cy.DirX,cy.DirY,cy.VelX,cy.VelY,cy.Speed,cy.BlState,cy.FramesInBlState+1>>0,cy.BattleAttr,cy.Bullet);if(AN(cz,b)){$s=18;continue;}$s=19;continue;case 18:if(AM(cz,b)){$s=20;continue;}$s=21;continue;case 20:da=AQ(cz.VirtualGridX,cz.VirtualGridY);db=da[0];dc=da[1];dd=AQ(cz.Bullet.HitboxSizeX,cz.Bullet.HitboxSizeY);de=dd[0];df=dd[1];dg=AY(db,dc,de,df,0.1,0.1,0.1,0.1,e,f,cz,"FireballBullet");$s=23;case 23:if($c){$c=false;dg=dg.$blk();}if(dg&&dg.$blk!==undefined){break s;}dh=dg;$r=c.Add(new CB([dh]));$s=24;case 24:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}cf=$append(cf,dh);cz.BlState=1;if(!((cz.BlState===cy.BlState))){cz.FramesInBlState=0;}di=cz.VirtualGridX+cz.VelX>>0;dj=cz.VirtualGridY+cz.VelY>>0;cz.VirtualGridX=di;cz.VirtualGridY=dj;$s=22;continue;case 21:case 22:o=$append(o,cz);case 19:cx++;$s=16;continue;case 17:dk=b.PlayersArr;dl=0;case 25:if(!(dl=dk.$length)?($throwRuntimeError("index out of range"),undefined):dk.$array[dk.$offset+dl]);dp=dn.JoinIndex;dq=((dm<0||dm>=ax.$length)?($throwRuntimeError("index out of range"),undefined):ax.$array[ax.$offset+dm]);dr=$assertType(dq.Shape,BS);ds=((dm<0||dm>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+dm]);du=AV(dp,dn,ds,dq,dr,0.1,(dt=dp-1>>0,((dt<0||dt>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+dt])));$s=27;case 27:if($c){$c=false;du=du.$blk();}if(du&&du.$blk!==undefined){break s;}(dv=dp-1>>0,((dv<0||dv>=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+dv]=du));dw=((dm<0||dm>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+dm]);dx=false;dy=dq.Check(0,0,new BN([]));if(!(BO.nil===dy)){$s=28;continue;}$s=29;continue;case 28:dz=dy.Objects;ea=0;case 30:if(!(ea=dz.$length)?($throwRuntimeError("index out of range"),undefined):dz.$array[dz.$offset+ea]);ec=false;ed=false;ee=false;ef=ec;eg=ed;eh=ee;ei=eb.Data;if($assertType(ei,BQ,true)[1]){eg=true;}else if($assertType(ei,BK,true)[1]||$assertType(ei,BR,true)[1]){eh=true;}else{ef=true;}if(eh){ea++;$s=30;continue;}ej=$assertType(eb.Shape,BS);el=AI(0,0,dr,ej);$s=32;case 32:if($c){$c=false;el=el.$blk();}if(el&&el.$blk!==undefined){break s;}ek=el;em=ek[0];en=ek[1];eo=ek[2];ep=ek[3];if(!em){ea++;$s=30;continue;}eq=ep.OverlapX*0+ep.OverlapY*-1;if(eg){er=(ep.Overlap-0.2)*ep.OverlapX;es=(ep.Overlap-0.2)*ep.OverlapY;en=er;eo=es;}et=(eu=dp-1>>0,((eu<0||eu>=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+eu])).$get();ev=0;while(true){if(!(ev=et.$length)?($throwRuntimeError("index out of range"),undefined):et.$array[et.$offset+ev]),C);ex=en*ew.X+eo*ew.Y;if(ef||(eg&&0>ex)){en=en-(ex*ew.X);eo=eo-(ex*ew.Y);}ev++;}ey=dp-1>>0;((ey<0||ey>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+ey]).X=((ey<0||ey>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+ey]).X+(en);ez=dp-1>>0;((ez<0||ez>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+ez]).Y=((ez<0||ez>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+ez]).Y+(eo);if(0.5=dn.VelY;if(fa){ds.VelY=0;ds.VelX=0;if(8===ds.CharacterState){ds.CharacterState=9;ds.FramesToRecover=dw.LayDownFramesToRecover;}else{fb=dn.CharacterState;if((fb===(8))||(fb===(4))||(fb===(5))||(fb===(16))){fc=0;fd=dn.ColliderRadius;fe=fc;ff=fd;fg=AQ(fe,ff);fh=fg[1];fi=dp-1>>0;((fi<0||fi>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+fi]).Y=((fi<0||fi>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+fi]).Y-(fh);}ds.CharacterState=0;ds.FramesToRecover=0;}}else{fj=(fk=Y[$Int32.keyFor(ds.CharacterState)],fk!==undefined?[fk.v,true]:[false,false]);fl=fj[1];if(fl){if(9===ds.CharacterState){if(0===ds.FramesToRecover){ds.CharacterState=10;ds.FramesToRecover=dw.GetUpFramesToRecover;}}else if(10===ds.CharacterState){if(0===ds.FramesToRecover){ds.CharacterState=0;ds.FramesInvinsible=dw.GetUpInvinsibleFrames;}}}}}if(dw.OnWallEnabled){if(ds.InAir){fm=(fn=W[$Int32.keyFor(dn.CharacterState)],fn!==undefined?[fn.v,true]:[false,false]);fo=fm[1];if(!fo){fp=(fq=dp-1>>0,((fq<0||fq>=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+fq])).$get();fr=0;while(true){if(!(fr=fp.$length)?($throwRuntimeError("index out of range"),undefined):fp.$array[fp.$offset+fr]),C);ft=fs.X*1+fs.Y*0;fu=fs.X*-1+fs.Y*0;if(0.9>0));fw=((fs.Y>>0));ds.OnWallNormX=fv;ds.OnWallNormY=fw;break;}if(0.9>0));fy=((fs.Y>>0));ds.OnWallNormX=fx;ds.OnWallNormY=fy;break;}fr++;}if(!dn.OnWall&&ds.OnWall){ds.VelY=0;}}}if(!ds.OnWall){fz=0;ga=0;ds.OnWallNormX=fz;ds.OnWallNormY=ga;}}dl++;$s=25;continue;case 26:gb=cf;gc=0;case 33:if(!(gc=gb.$length)?($throwRuntimeError("index out of range"),undefined):gb.$array[gb.$offset+gc]);ge=gd.Check(0,0,new BN([]));gd.Space.Remove(new CB([gd]));gf=false;if(!(BO.nil===ge)){$s=35;continue;}$s=36;continue;case 35:gg=gd.Data;if($assertType(gg,BK,true)[1]){$s=37;continue;}if($assertType(gg,BR,true)[1]){$s=38;continue;}$s=39;continue;case 37:gh=gg.$val;gj=$assertType(gd.Shape,BS);gm=(gk=b.PlayersArr,gl=gh.BattleAttr.OffenderJoinIndex-1>>0,((gl<0||gl>=gk.$length)?($throwRuntimeError("index out of range"),undefined):gk.$array[gk.$offset+gl]));gn=ge.Objects;go=0;case 40:if(!(go=gn.$length)?($throwRuntimeError("index out of range"),undefined):gn.$array[gn.$offset+go]);gq=$assertType(gp.Shape,BS);gr=gp.Data;if($assertType(gr,BQ,true)[1]){$s=42;continue;}$s=43;continue;case 42:gs=gr.$val;if(gh.BattleAttr.OffenderJoinIndex===gs.JoinIndex){go++;$s=40;continue;}gu=AI(0,0,gj,gq);$s=44;case 44:if($c){$c=false;gu=gu.$blk();}if(gu&&gu.$blk!==undefined){break s;}gt=gu;gv=gt[0];if(!gv){go++;$s=40;continue;}gf=true;gw=(gx=X[$Int32.keyFor(gs.CharacterState)],gx!==undefined?[gx.v,true]:[false,false]);gy=gw[1];if(gy){go++;$s=40;continue;}if(0gm.DirX){gz=-gz;}ha=$imul(gz,gh.Bullet.PushbackVelX);hb=gh.Bullet.PushbackVelY;hc=ha;hd=hb;hf=(he=gs.JoinIndex-1>>0,((he<0||he>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+he]));hf.VelX=hc;hf.VelY=hd;if(gh.Bullet.BlowUp){hf.CharacterState=8;}else{hf.CharacterState=3;}hh=(hg=gs.JoinIndex-1>>0,((hg<0||hg>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+hg])).FramesToRecover;if(gh.Bullet.HitStunFrames>hh){hf.FramesToRecover=gh.Bullet.HitStunFrames;}case 43:go++;$s=40;continue;case 41:$s=39;continue;case 38:gi=gg.$val;hi=$assertType(gd.Shape,BS);hl=(hj=b.PlayersArr,hk=gi.BattleAttr.OffenderJoinIndex-1>>0,((hk<0||hk>=hj.$length)?($throwRuntimeError("index out of range"),undefined):hj.$array[hj.$offset+hk]));hm=ge.Objects;hn=0;case 45:if(!(hn=hm.$length)?($throwRuntimeError("index out of range"),undefined):hm.$array[hm.$offset+hn]);hp=$assertType(ho.Shape,BS);hq=ho.Data;if($assertType(hq,BQ,true)[1]){$s=47;continue;}$s=48;continue;case 47:hr=hq.$val;if(gi.BattleAttr.OffenderJoinIndex===hr.JoinIndex){hn++;$s=45;continue;}hu=AI(0,0,hi,hp);$s=50;case 50:if($c){$c=false;hu=hu.$blk();}if(hu&&hu.$blk!==undefined){break s;}ht=hu;hv=ht[0];if(!hv){hn++;$s=45;continue;}gf=true;hw=(hx=X[$Int32.keyFor(hr.CharacterState)],hx!==undefined?[hx.v,true]:[false,false]);hy=hw[1];if(hy){hn++;$s=45;continue;}if(0hl.DirX){hz=-hz;}ia=$imul(hz,gi.Bullet.PushbackVelX);ib=gi.Bullet.PushbackVelY;ic=ia;id=ib;ig=(ie=hr.JoinIndex-1>>0,((ie<0||ie>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+ie]));ig.VelX=ic;ig.VelY=id;if(gi.Bullet.BlowUp){ig.CharacterState=8;}else{ig.CharacterState=3;}ii=(ih=hr.JoinIndex-1>>0,((ih<0||ih>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+ih])).FramesToRecover;if(gi.Bullet.HitStunFrames>ii){ig.FramesToRecover=gi.Bullet.HitStunFrames;}$s=49;continue;case 48:hs=hq;gf=true;case 49:hn++;$s=45;continue;case 46:case 39:case 36:if(gf){ij=gd.Data;if($assertType(ij,BK,true)[1]){ik=ij.$val;ik.BlState=2;ik.FramesInBlState=0;}else if($assertType(ij,BR,true)[1]){il=ij.$val;il.BlState=2;il.FramesInBlState=0;}}gc++;$s=33;continue;case 34:im=b.PlayersArr;io=0;while(true){if(!(io=im.$length)?($throwRuntimeError("index out of range"),undefined):im.$array[im.$offset+io]);ir=iq.JoinIndex;is=((ip<0||ip>=ax.$length)?($throwRuntimeError("index out of range"),undefined):ax.$array[ax.$offset+ip]);it=((ip<0||ip>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+ip]);iu=AT(is.X-(iv=ir-1>>0,((iv<0||iv>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+iv])).X,is.Y-(iw=ir-1>>0,((iw<0||iw>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+iw])).Y,is.W*0.5,is.H*0.5,0,0,0,0,e,f);it.VirtualGridX=iu[0];it.VirtualGridY=iu[1];if(it.InAir){ix=it.CharacterState;iy=ix;if((iy===(0))||(iy===(1))){if(it.OnWall){it.CharacterState=16;}else if(((ip<0||ip>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+ip])||(5===iq.CharacterState)){it.CharacterState=5;}else{it.CharacterState=4;}}else if(iy===(2)){it.CharacterState=6;}else if(iy===(3)){it.CharacterState=7;}}if(!((it.CharacterState===iq.CharacterState))){it.FramesInChState=0;}iz=(ja=Y[$Int32.keyFor(it.CharacterState)],ja!==undefined?[ja.v,true]:[false,false]);jb=iz[1];if(jb){it.ActiveSkillId=-1;it.ActiveSkillHit=-1;}io++;}jc=ax;jd=0;while(true){if(!(jd=jc.$length)?($throwRuntimeError("index out of range"),undefined):jc.$array[jc.$offset+jd]);je.Space.Remove(new CB([je]));jd++;}$s=-1;return new N.ptr(b.Id+1>>0,i,new $Int64(0,0),n,o,new $Uint64(0,0),false,s);}return;}var $f={$blk:AX,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,d,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,e,ea,eb,ec,ed,ee,ef,eg,eh,ei,ej,ek,el,em,en,eo,ep,eq,er,es,et,eu,ev,ew,ex,ey,ez,f,fa,fb,fc,fd,fe,ff,fg,fh,fi,fj,fk,fl,fm,fn,fo,fp,fq,fr,fs,ft,fu,fv,fw,fx,fy,fz,g,ga,gb,gc,gd,ge,gf,gg,gh,gi,gj,gk,gl,gm,gn,go,gp,gq,gr,gs,gt,gu,gv,gw,gx,gy,gz,h,ha,hb,hc,hd,he,hf,hg,hh,hi,hj,hk,hl,hm,hn,ho,hp,hq,hr,hs,ht,hu,hv,hw,hx,hy,hz,i,ia,ib,ic,id,ie,ig,ih,ii,ij,ik,il,im,io,ip,iq,ir,is,it,iu,iv,iw,ix,iy,iz,j,ja,jb,jc,jd,je,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame=AX;AY=function(a,b,c,d,e,f,g,h,i,j,k,l){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l});$s=$s||0;s:while(true){switch($s){case 0:m=AR(a,b,c*0.5,d*0.5,e,f,g,h,i,j);n=m[0];o=m[1];p=AZ(n,o,g+c+h,f+d+e,k,l);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;$s=2;case 2:return q;}return;}var $f={$blk:AY,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s};return $f;};$pkg.GenerateRectCollider=AY;AZ=function(a,b,c,d,e,f){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e,f});$s=$s||0;s:while(true){switch($s){case 0:g=B.NewObject(a,b,c,d,new BN([f]));h=B.NewRectangle(0,0,c,d);$r=g.SetShape(h);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g.Data=e;$s=-1;return g;}return;}var $f={$blk:AZ,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};BA=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=BB(a);g=0;h=0;i=g;j=h;k=B.NewConvexPolygon(CC.nil);l=f.Points;m=0;while(true){if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);p=f.Points;q=0;while(true){if(!(q=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);if(n===r){q++;continue;}if(A.Abs(s.X-o.X)>i){i=A.Abs(s.X-o.X);}if(A.Abs(s.Y-o.Y)>j){j=A.Abs(s.Y-o.Y);}q++;}m++;}t=0;while(true){if(!(t=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+t]));k.AddPoints(new CC([v.X,v.Y]));t=t+(1)>>0;}w=B.NewObject(f.Anchor.X+b,f.Anchor.Y+c,i,j,new BN([e]));$r=w.SetShape(k);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}w.Data=d;$s=-1;return w;}return;}var $f={$blk:BA,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s};return $f;};$pkg.GenerateConvexPolygonCollider=BA;BB=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=new C.ptr(1.7e+308,1.7e+308);c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.X=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]);(k=f.Points,((i<0||i>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+i]=new C.ptr(j.X-b.X,j.Y-b.Y)));h++;}return f;};$pkg.AlignPolygon2DToBoundingBox=BB;BC=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;return new K.ptr(u,v,new J.ptr(a,b,c,t),new I.ptr(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,w,x,false));};$pkg.NewMeleeBullet=BC;BD=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac,ad,ae){var a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;return new L.ptr(u,v,w,x,y,z,aa,0,0,new J.ptr(a,b,c,t),new I.ptr(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,ad,ae,false));};$pkg.NewFireballBullet=BD;CH.methods=[{prop:"Put",name:"Put",pkg:"",typ:$funcType([$emptyInterface],[],false)},{prop:"Pop",name:"Pop",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"GetArrIdxByOffset",name:"GetArrIdxByOffset",pkg:"",typ:$funcType([$Int32],[$Int32],false)},{prop:"GetByOffset",name:"GetByOffset",pkg:"",typ:$funcType([$Int32],[$emptyInterface],false)},{prop:"GetByFrameId",name:"GetByFrameId",pkg:"",typ:$funcType([$Int32],[$emptyInterface],false)},{prop:"SetByFrameId",name:"SetByFrameId",pkg:"",typ:$funcType([$emptyInterface,$Int32],[$Int32,$Int32,$Int32],false)}];C.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""}]);D.init("",[{prop:"Anchor",name:"Anchor",embedded:false,exported:true,typ:CD,tag:""},{prop:"Points",name:"Points",embedded:false,exported:true,typ:CE,tag:""}]);E.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridX",name:"VirtualGridX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridY",name:"VirtualGridY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirX",name:"DirX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirY",name:"DirY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelX",name:"VelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelY",name:"VelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BattleState",name:"BattleState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"JoinIndex",name:"JoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ColliderRadius",name:"ColliderRadius",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Removed",name:"Removed",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Score",name:"Score",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"LastMoveGmtMillis",name:"LastMoveGmtMillis",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesToRecover",name:"FramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesInChState",name:"FramesInChState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Hp",name:"Hp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"MaxHp",name:"MaxHp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CharacterState",name:"CharacterState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InAir",name:"InAir",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"OnWall",name:"OnWall",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"OnWallNormX",name:"OnWallNormX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OnWallNormY",name:"OnWallNormY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ActiveSkillId",name:"ActiveSkillId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ActiveSkillHit",name:"ActiveSkillHit",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesInvinsible",name:"FramesInvinsible",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BulletTeamId",name:"BulletTeamId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ChCollisionTeamId",name:"ChCollisionTeamId",embedded:false,exported:true,typ:$Int32,tag:""}]);F.init("",[{prop:"Dx",name:"Dx",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Dy",name:"Dy",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnALevel",name:"BtnALevel",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnBLevel",name:"BtnBLevel",embedded:false,exported:true,typ:$Int32,tag:""}]);H.init("",[{prop:"Boundary",name:"Boundary",embedded:false,exported:true,typ:CF,tag:""}]);I.init("",[{prop:"StartupFrames",name:"StartupFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CancellableStFrame",name:"CancellableStFrame",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CancellableEdFrame",name:"CancellableEdFrame",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ActiveFrames",name:"ActiveFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitStunFrames",name:"HitStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BlockStunFrames",name:"BlockStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PushbackVelX",name:"PushbackVelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PushbackVelY",name:"PushbackVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Damage",name:"Damage",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SelfLockVelX",name:"SelfLockVelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SelfLockVelY",name:"SelfLockVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxOffsetX",name:"HitboxOffsetX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxOffsetY",name:"HitboxOffsetY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxSizeX",name:"HitboxSizeX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxSizeY",name:"HitboxSizeY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BlowUp",name:"BlowUp",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"ExplosionFrames",name:"ExplosionFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SpeciesId",name:"SpeciesId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CancelTransit",name:"CancelTransit",embedded:false,exported:true,typ:CG,tag:""}]);J.init("",[{prop:"BulletLocalId",name:"BulletLocalId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OriginatedRenderFrameId",name:"OriginatedRenderFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OffenderJoinIndex",name:"OffenderJoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"TeamId",name:"TeamId",embedded:false,exported:true,typ:$Int32,tag:""}]);K.init("",[{prop:"BlState",name:"BlState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesInBlState",name:"FramesInBlState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BattleAttr",name:"BattleAttr",embedded:false,exported:true,typ:BH,tag:""},{prop:"Bullet",name:"Bullet",embedded:false,exported:true,typ:BI,tag:""}]);L.init("",[{prop:"VirtualGridX",name:"VirtualGridX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridY",name:"VirtualGridY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirX",name:"DirX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirY",name:"DirY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelX",name:"VelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelY",name:"VelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BlState",name:"BlState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesInBlState",name:"FramesInBlState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BattleAttr",name:"BattleAttr",embedded:false,exported:true,typ:BH,tag:""},{prop:"Bullet",name:"Bullet",embedded:false,exported:true,typ:BI,tag:""}]);M.init("",[{prop:"BattleLocalId",name:"BattleLocalId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFrames",name:"RecoveryFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnBlock",name:"RecoveryFramesOnBlock",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnHit",name:"RecoveryFramesOnHit",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ReleaseTriggerType",name:"ReleaseTriggerType",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BoundChState",name:"BoundChState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Hits",name:"Hits",embedded:false,exported:true,typ:BG,tag:""}]);N.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PlayersArr",name:"PlayersArr",embedded:false,exported:true,typ:BV,tag:""},{prop:"CountdownNanos",name:"CountdownNanos",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"MeleeBullets",name:"MeleeBullets",embedded:false,exported:true,typ:BW,tag:""},{prop:"FireballBullets",name:"FireballBullets",embedded:false,exported:true,typ:BX,tag:""},{prop:"BackendUnconfirmedMask",name:"BackendUnconfirmedMask",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"ShouldForceResync",name:"ShouldForceResync",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"BulletLocalIdCounter",name:"BulletLocalIdCounter",embedded:false,exported:true,typ:$Int32,tag:""}]);O.init("",[{prop:"InputFrameId",name:"InputFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InputList",name:"InputList",embedded:false,exported:true,typ:BU,tag:""},{prop:"ConfirmedList",name:"ConfirmedList",embedded:false,exported:true,typ:$Uint64,tag:""}]);P.init("",[{prop:"FlAct",name:"FlAct",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"FrAct",name:"FrAct",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""}]);Q.init("",[{prop:"Ed",name:"Ed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"St",name:"St",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"EdFrameId",name:"EdFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"StFrameId",name:"StFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"N",name:"N",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Cnt",name:"Cnt",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Eles",name:"Eles",embedded:false,exported:true,typ:BG,tag:""}]);S.init([$Int,BQ],[$Int],false);T.init("",[{prop:"SpeciesId",name:"SpeciesId",embedded:false,exported:true,typ:$Int,tag:""},{prop:"SpeciesName",name:"SpeciesName",embedded:false,exported:true,typ:$String,tag:""},{prop:"InAirIdleFrameIdxTurningPoint",name:"InAirIdleFrameIdxTurningPoint",embedded:false,exported:true,typ:$Int,tag:""},{prop:"InAirIdleFrameIdxTurnedCycle",name:"InAirIdleFrameIdxTurnedCycle",embedded:false,exported:true,typ:$Int,tag:""},{prop:"LayDownFrames",name:"LayDownFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"LayDownFramesToRecover",name:"LayDownFramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"GetUpInvinsibleFrames",name:"GetUpInvinsibleFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"GetUpFramesToRecover",name:"GetUpFramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"JumpingInitVelY",name:"JumpingInitVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DashingEnabled",name:"DashingEnabled",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"OnWallEnabled",name:"OnWallEnabled",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"WallJumpingFramesToRecover",name:"WallJumpingFramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"WallJumpingInitVelX",name:"WallJumpingInitVelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"WallJumpingInitVelY",name:"WallJumpingInitVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"WallSlidingVelY",name:"WallSlidingVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SkillMapper",name:"SkillMapper",embedded:false,exported:true,typ:S,tag:""}]);AH.init("",[{prop:"Overlap",name:"Overlap",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapX",name:"OverlapX",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapY",name:"OverlapY",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"AContainedInB",name:"AContainedInB",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"BContainedInA",name:"BContainedInA",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Axis",name:"Axis",embedded:false,exported:true,typ:B.Vector,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.DIRECTION_DECODER=new BF([new BE([0,0]),new BE([0,2]),new BE([0,-2]),new BE([2,0]),new BE([-2,0]),new BE([1,1]),new BE([-1,-1]),new BE([1,-1]),new BE([-1,1])]);U=$makeMap($Int.keyFor,[{k:1,v:new M.ptr(0,30,30,30,1,2,new BG([new K.ptr(0,0,BH.nil,new I.ptr(7,13,30,22,13,9,50,0,5,5,-1,1200,0,2400,3200,false,9,1,$makeMap($Int.keyFor,[{k:1,v:2}])))]))},{k:2,v:new M.ptr(0,36,36,36,1,11,new BG([new K.ptr(0,0,BH.nil,new I.ptr(18,22,36,18,18,9,50,0,5,10,-1,1800,0,2400,3200,false,9,1,$makeMap($Int.keyFor,[{k:1,v:3}])))]))},{k:3,v:new M.ptr(0,50,50,50,1,12,new BG([new K.ptr(0,0,BH.nil,new I.ptr(8,0,0,30,999999999,9,200,700,10,50,500,1600,800,3200,3200,true,9,1,false))]))},{k:4,v:new M.ptr(0,30,30,30,1,2,new BG([new K.ptr(0,0,BH.nil,new I.ptr(7,13,30,22,13,9,50,0,5,5,-1,1200,0,2400,3200,false,15,2,$makeMap($Int.keyFor,[{k:1,v:5}])))]))},{k:5,v:new M.ptr(0,36,36,36,1,11,new BG([new K.ptr(0,0,BH.nil,new I.ptr(18,22,36,18,18,9,50,0,5,10,-1,1800,0,2400,3200,false,15,2,$makeMap($Int.keyFor,[{k:1,v:6}])))]))},{k:6,v:new M.ptr(0,45,45,45,1,12,new BG([new K.ptr(0,0,BH.nil,new I.ptr(8,0,0,28,999999999,9,200,300,10,-1,-1,2400,0,3200,3200,true,15,2,false))]))},{k:7,v:new M.ptr(0,30,30,30,1,2,new BG([new K.ptr(0,0,BH.nil,new I.ptr(7,13,30,22,13,9,50,0,5,-1,-1,1200,0,2400,3200,false,9,1,$makeMap($Int.keyFor,[{k:1,v:8}])))]))},{k:8,v:new M.ptr(0,36,36,36,1,11,new BG([new K.ptr(0,0,BH.nil,new I.ptr(18,22,36,18,18,9,50,0,5,10,-1,1800,0,2400,3200,false,9,1,$makeMap($Int.keyFor,[{k:1,v:9}])))]))},{k:9,v:new M.ptr(0,40,40,40,1,12,new BG([new K.ptr(0,0,BH.nil,new I.ptr(7,0,0,30,999999999,9,200,400,10,100,-1,1000,0,3200,3200,true,9,1,false))]))},{k:10,v:new M.ptr(0,40,40,40,1,13,new BG([new L.ptr(0,0,0,0,0,0,500,0,0,BH.nil,new I.ptr(12,0,0,999999999,15,9,200,0,20,-1,-1,2400,500,4800,3200,false,5,1,false))]))},{k:11,v:new M.ptr(0,60,60,60,1,14,new BG([new K.ptr(0,0,BH.nil,new I.ptr(3,0,0,25,999999999,9,200,700,30,100,800,800,0,4000,6400,true,15,3,false))]))},{k:255,v:new M.ptr(0,30,30,30,1,6,new BG([new K.ptr(0,0,BH.nil,new I.ptr(3,0,0,20,18,9,50,0,5,-1,-1,1200,0,3200,2400,false,9,1,false))]))},{k:256,v:new M.ptr(0,20,20,20,1,6,new BG([new K.ptr(0,0,BH.nil,new I.ptr(3,0,0,10,15,9,50,0,5,-1,-1,1200,0,3200,2400,false,15,2,false))]))},{k:257,v:new M.ptr(0,30,30,30,1,6,new BG([new K.ptr(0,0,BH.nil,new I.ptr(3,0,0,20,18,9,50,0,5,-1,-1,1200,0,3200,2400,false,9,1,false))]))}]);$pkg.Characters=$makeMap($Int.keyFor,[{k:0,v:new T.ptr(0,"MonkGirl",11,1,16,16,10,27,300,800,false,false,0,0,0,0,(function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;if(1===a){if(0===b.FramesToRecover){if(b.InAir){return 255;}else{return 1;}}else{c=(d=U[$Int.keyFor(((b.ActiveSkillId>>0)))],d!==undefined?[d.v,true]:[BJ.nil,false]);e=c[0];f=c[1];if(f){g=(h=e.Hits,i=b.ActiveSkillHit,((i<0||i>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]));if($assertType(g,BK,true)[1]){j=g.$val;if(j.Bullet.CancellableStFrame<=b.FramesInChState&&b.FramesInChState>0)))],d!==undefined?[d.v,true]:[BJ.nil,false]);e=c[0];f=c[1];if(f){g=(h=e.Hits,i=b.ActiveSkillHit,((i<0||i>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]));if($assertType(g,BK,true)[1]){j=g.$val;if(j.Bullet.CancellableStFrame<=b.FramesInChState&&b.FramesInChState>0)))],d!==undefined?[d.v,true]:[BJ.nil,false]);e=c[0];f=c[1];if(f){g=(h=e.Hits,i=b.ActiveSkillHit,((i<0||i>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]));if($assertType(g,BK,true)[1]){j=g.$val;if(j.Bullet.CancellableStFrame<=b.FramesInChState&&b.FramesInChState=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);g=A.MakeFullWrapper(f);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}c=$append(c,g);e++;$s=1;continue;case 2:$s=-1;return c;}return;}var $f={$blk:O,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};$pkg.GetCollisionSpaceObjsJs=O;P=function(a,b,c,d,e,f,g,h){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h});$s=$s||0;s:while(true){switch($s){case 0:i=0.1;j=0.1;k=0.1;l=0.1;m=i;n=j;o=k;p=l;q=B.GenerateRectCollider(a,b,c,d,m,n,o,p,e,f,g,h);$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=A.MakeFullWrapper(q);$s=2;case 2:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=r;$s=3;case 3:return s;}return;}var $f={$blk:P,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};$pkg.GenerateRectColliderJs=P;Q=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=B.GenerateConvexPolygonCollider(a,b,c,d,e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=A.MakeFullWrapper(f);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=3;case 3:return h;}return;}var $f={$blk:Q,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};$pkg.GenerateConvexPolygonColliderJs=Q;R=function(a){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=$makeSlice(AF,a.$length,a.$length);c=a;d=0;case 1:if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);h=A.MakeFullWrapper((g=B.Characters[$Int.keyFor(f)],g!==undefined?g.v:AG.nil));$s=3;case 3:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}((e<0||e>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e]=h);d++;$s=1;continue;case 2:$s=-1;return b;}return;}var $f={$blk:R,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};$pkg.GetCharacterConfigsOrderedByJoinIndex=R;S=function(a,b,c,d,e,f,g){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g});$s=$s||0;s:while(true){switch($s){case 0:h=B.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(a,b,c,d,e,f,g);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=A.MakeFullWrapper(h);$s=2;case 2:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;$s=3;case 3:return j;}return;}var $f={$blk:S,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs=S;T=function(){$global.gopkgs=$externalize($makeMap($String.keyFor,[{k:"NewVec2DJs",v:new AH(G)},{k:"NewPolygon2DJs",v:new AI(H)},{k:"NewBarrierJs",v:new AJ(I)},{k:"NewPlayerDownsyncJs",v:new AK(J)},{k:"NewMeleeBulletJs",v:new AL(K)},{k:"NewFireballBulletJs",v:new AM(L)},{k:"NewNpcPatrolCue",v:new AN(M)},{k:"NewRoomDownsyncFrameJs",v:new AO(N)},{k:"NewCollisionSpaceJs",v:new AP(F)},{k:"NewInputFrameDownsync",v:new AQ(D)},{k:"NewRingBufferJs",v:new AR(E)},{k:"GenerateRectColliderJs",v:new AS(P)},{k:"GenerateConvexPolygonColliderJs",v:new AT(Q)},{k:"GetCollisionSpaceObjsJs",v:new AV(O)},{k:"WorldToPolygonColliderBLPos",v:new AW(B.WorldToPolygonColliderBLPos)},{k:"PolygonColliderBLToWorldPos",v:new AW(B.PolygonColliderBLToWorldPos)},{k:"WorldToVirtualGridPos",v:new AX(B.WorldToVirtualGridPos)},{k:"VirtualGridToWorldPos",v:new AY(B.VirtualGridToWorldPos)},{k:"GetCharacterConfigsOrderedByJoinIndex",v:new BA(R)},{k:"ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs",v:new BG(S)},{k:"ConvertToDelayedInputFrameId",v:new BH(B.ConvertToDelayedInputFrameId)},{k:"ConvertToNoDelayInputFrameId",v:new BH(B.ConvertToNoDelayInputFrameId)},{k:"ConvertToFirstUsedRenderFrameId",v:new BH(B.ConvertToFirstUsedRenderFrameId)},{k:"ConvertToLastUsedRenderFrameId",v:new BH(B.ConvertToLastUsedRenderFrameId)},{k:"ShouldGenerateInputFrameUpsync",v:new BI(B.ShouldGenerateInputFrameUpsync)},{k:"IsMeleeBulletActive",v:new BJ(B.IsMeleeBulletActive)},{k:"IsMeleeBulletAlive",v:new BJ(B.IsMeleeBulletAlive)},{k:"IsFireballBulletActive",v:new BK(B.IsFireballBulletActive)},{k:"IsFireballBulletAlive",v:new BK(B.IsFireballBulletAlive)}]),BL);};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if($pkg===$mainPkg){T();$mainFinished=true;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); $synthesizeMethods(); $initAllLinknames(); var $mainPkg = $packages["jsexport"]; diff --git a/frontend/assets/resources/animation/Explosion.meta b/frontend/assets/resources/animation/Explosion.meta new file mode 100644 index 0000000..09e0fd6 --- /dev/null +++ b/frontend/assets/resources/animation/Explosion.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.0.1", + "uuid": "c7c2ac6e-f1ea-4233-b6a4-aa5b96b61e17", + "isSubpackage": false, + "subpackageName": "", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/Explosion/Fireball1Explosion.anim b/frontend/assets/resources/animation/Explosion/Fireball1Explosion.anim new file mode 100644 index 0000000..f36e1ec --- /dev/null +++ b/frontend/assets/resources/animation/Explosion/Fireball1Explosion.anim @@ -0,0 +1,55 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "Fireball1Explosion", + "_objFlags": 0, + "_native": "", + "_duration": 0.1, + "sample": 60, + "speed": 1, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "f4ad4f9f-4890-450b-9334-68fe6b903893" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "c6a5994f-251d-4191-a550-dfef979bab59" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "417e58d9-e364-47f7-9364-f31ad3452adc" + } + }, + { + "frame": 0.05, + "value": { + "__uuid__": "8b566f26-b34d-4da6-bdaa-078358a5b685" + } + }, + { + "frame": 0.06666666666666667, + "value": { + "__uuid__": "6ec5f75d-307e-4292-b667-cbbb5a52c2f6" + } + }, + { + "frame": 0.08333333333333333, + "value": { + "__uuid__": "d89977f1-d927-4a08-9591-9feb1daf68c8" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/Explosion/Fireball1Explosion.anim.meta b/frontend/assets/resources/animation/Explosion/Fireball1Explosion.anim.meta new file mode 100644 index 0000000..7df59fc --- /dev/null +++ b/frontend/assets/resources/animation/Explosion/Fireball1Explosion.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "7941215a-2b8c-4798-954b-4f1b16d5f6f5", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/Explosion/MeleeExplosion1.anim b/frontend/assets/resources/animation/Explosion/MeleeExplosion1.anim new file mode 100644 index 0000000..18c4e94 --- /dev/null +++ b/frontend/assets/resources/animation/Explosion/MeleeExplosion1.anim @@ -0,0 +1,79 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "MeleeExplosion1", + "_objFlags": 0, + "_native": "", + "_duration": 0.16666666666666666, + "sample": 60, + "speed": 1, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "ab4866e8-ce52-4bc1-be19-b03687acf0d6" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "67cc8a51-0ebe-49db-a941-7aabc5655ecf" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "367592d0-3566-4b6a-8707-01d6a8dbe34a" + } + }, + { + "frame": 0.05, + "value": { + "__uuid__": "cc336b1e-b5d8-4a89-96fc-7ada0e232389" + } + }, + { + "frame": 0.06666666666666667, + "value": { + "__uuid__": "a457cc63-08bd-4cfa-b84a-7287d0343ecf" + } + }, + { + "frame": 0.08333333333333333, + "value": { + "__uuid__": "89697d35-cde3-4392-a231-db91d4ede29b" + } + }, + { + "frame": 0.1, + "value": { + "__uuid__": "3815bf7a-0a48-40e0-b791-0a0be9ec0da6" + } + }, + { + "frame": 0.11666666666666667, + "value": { + "__uuid__": "20e691ee-a0c0-4710-8981-8dee1911e819" + } + }, + { + "frame": 0.13333333333333333, + "value": { + "__uuid__": "94e678c5-0780-4f2b-bf3b-86c6c0a75c23" + } + }, + { + "frame": 0.15, + "value": { + "__uuid__": "af4f9c62-4c7e-43a4-b9b3-dd3effbbbafb" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/Explosion/MeleeExplosion1.anim.meta b/frontend/assets/resources/animation/Explosion/MeleeExplosion1.anim.meta new file mode 100644 index 0000000..63d0482 --- /dev/null +++ b/frontend/assets/resources/animation/Explosion/MeleeExplosion1.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "954a2924-89df-4df4-93fc-36d2b22e7619", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/Explosion/MeleeExplosion2.anim b/frontend/assets/resources/animation/Explosion/MeleeExplosion2.anim new file mode 100644 index 0000000..a092acb --- /dev/null +++ b/frontend/assets/resources/animation/Explosion/MeleeExplosion2.anim @@ -0,0 +1,79 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "MeleeExplosion2", + "_objFlags": 0, + "_native": "", + "_duration": 0.26666666666666666, + "sample": 60, + "speed": 1, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "89e54317-7835-4d4c-9c04-579da8b33c54" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "2a186e00-a0c5-4c8a-b0ab-c84d56dcee7c" + } + }, + { + "frame": 0.05, + "value": { + "__uuid__": "083168e3-6ccc-4c5b-a800-2554bffc67d4" + } + }, + { + "frame": 0.08333333333333333, + "value": { + "__uuid__": "d4b12ec9-6f04-493c-91e5-22b1a212262a" + } + }, + { + "frame": 0.13333333333333333, + "value": { + "__uuid__": "13038788-b0f9-4714-960b-c98619a0d0ce" + } + }, + { + "frame": 0.16666666666666666, + "value": { + "__uuid__": "94c21ed7-94a2-47a4-9537-fe5d9c51d7b0" + } + }, + { + "frame": 0.2, + "value": { + "__uuid__": "d5340298-923c-4bd7-9fd7-7a2e029a2b44" + } + }, + { + "frame": 0.21666666666666667, + "value": { + "__uuid__": "c4b145c0-0145-4e09-8559-9ef508d95be8" + } + }, + { + "frame": 0.23333333333333334, + "value": { + "__uuid__": "79398d4d-305e-4987-b199-d9d9649cf490" + } + }, + { + "frame": 0.25, + "value": { + "__uuid__": "c032eb65-fdf3-41e6-b868-d95df34168df" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/Explosion/MeleeExplosion2.anim.meta b/frontend/assets/resources/animation/Explosion/MeleeExplosion2.anim.meta new file mode 100644 index 0000000..47c1f23 --- /dev/null +++ b/frontend/assets/resources/animation/Explosion/MeleeExplosion2.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "5bd304eb-c8ba-426f-a9ab-5698ac62de85", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/Explosion/MeleeExplosion3.anim b/frontend/assets/resources/animation/Explosion/MeleeExplosion3.anim new file mode 100644 index 0000000..78e22bc --- /dev/null +++ b/frontend/assets/resources/animation/Explosion/MeleeExplosion3.anim @@ -0,0 +1,79 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "MeleeExplosion3", + "_objFlags": 0, + "_native": "", + "_duration": 0.26666666666666666, + "sample": 60, + "speed": 1, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "20d9ce6b-d9ab-4402-8c59-770ad0adf570" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "0654601f-6788-4a2c-aed4-8dfbe1c5fdd0" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "0913e11a-c796-4b58-94cf-f70b3869deff" + } + }, + { + "frame": 0.06666666666666667, + "value": { + "__uuid__": "d6b58622-2cc3-4ee6-a34f-1a18deb73700" + } + }, + { + "frame": 0.08333333333333333, + "value": { + "__uuid__": "b83c6261-b86f-4323-ad11-7375cac02a2b" + } + }, + { + "frame": 0.11666666666666667, + "value": { + "__uuid__": "b458c047-b7b5-4476-996e-d4c1ca85ef9c" + } + }, + { + "frame": 0.15, + "value": { + "__uuid__": "3971256a-8120-448e-8adf-de8d67dedfd3" + } + }, + { + "frame": 0.18333333333333332, + "value": { + "__uuid__": "0e548d92-36c8-4795-b3dc-2bc2cfcd7170" + } + }, + { + "frame": 0.21666666666666667, + "value": { + "__uuid__": "25f94245-87b0-4954-abab-c817c80fed37" + } + }, + { + "frame": 0.25, + "value": { + "__uuid__": "20d9ce6b-d9ab-4402-8c59-770ad0adf570" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/Explosion/MeleeExplosion3.anim.meta b/frontend/assets/resources/animation/Explosion/MeleeExplosion3.anim.meta new file mode 100644 index 0000000..d888664 --- /dev/null +++ b/frontend/assets/resources/animation/Explosion/MeleeExplosion3.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "5054633c-a588-4506-b4ac-eef29b1d8511", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/Explosion/MeleeExplosions.plist b/frontend/assets/resources/animation/Explosion/MeleeExplosions.plist new file mode 100644 index 0000000..f68d963 --- /dev/null +++ b/frontend/assets/resources/animation/Explosion/MeleeExplosions.plist @@ -0,0 +1,476 @@ + + + + + frames + + Explosion1_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,67} + spriteSourceSize + {71,67} + textureRect + {{0,506},{71,67}} + textureRotated + + + Explosion1_10.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,67} + spriteSourceSize + {71,67} + textureRect + {{0,577},{71,67}} + textureRotated + + + Explosion1_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,67} + spriteSourceSize + {71,67} + textureRect + {{67,506},{71,67}} + textureRotated + + + Explosion1_3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,67} + spriteSourceSize + {71,67} + textureRect + {{67,577},{71,67}} + textureRotated + + + Explosion1_4.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,67} + spriteSourceSize + {71,67} + textureRect + {{134,506},{71,67}} + textureRotated + + + Explosion1_5.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,67} + spriteSourceSize + {71,67} + textureRect + {{134,577},{71,67}} + textureRotated + + + Explosion1_6.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,67} + spriteSourceSize + {71,67} + textureRect + {{355,503},{71,67}} + textureRotated + + + Explosion1_7.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,67} + spriteSourceSize + {71,67} + textureRect + {{426,503},{71,67}} + textureRotated + + + Explosion1_8.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,67} + spriteSourceSize + {71,67} + textureRect + {{355,570},{71,67}} + textureRotated + + + Explosion1_9.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,67} + spriteSourceSize + {71,67} + textureRect + {{422,570},{71,67}} + textureRotated + + + Explosion2_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {88,45} + spriteSourceSize + {88,45} + textureRect + {{462,0},{88,45}} + textureRotated + + + Explosion2_10.png + + aliases + + spriteOffset + {0,0} + spriteSize + {88,45} + spriteSourceSize + {88,45} + textureRect + {{462,88},{88,45}} + textureRotated + + + Explosion2_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {88,45} + spriteSourceSize + {88,45} + textureRect + {{462,176},{88,45}} + textureRotated + + + Explosion2_3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {88,45} + spriteSourceSize + {88,45} + textureRect + {{462,264},{88,45}} + textureRotated + + + Explosion2_4.png + + aliases + + spriteOffset + {0,0} + spriteSize + {88,45} + spriteSourceSize + {88,45} + textureRect + {{0,304},{88,45}} + textureRotated + + + Explosion2_5.png + + aliases + + spriteOffset + {0,0} + spriteSize + {88,45} + spriteSourceSize + {88,45} + textureRect + {{88,304},{88,45}} + textureRotated + + + Explosion2_6.png + + aliases + + spriteOffset + {0,0} + spriteSize + {88,45} + spriteSourceSize + {88,45} + textureRect + {{176,304},{88,45}} + textureRotated + + + Explosion2_7.png + + aliases + + spriteOffset + {0,0} + spriteSize + {88,45} + spriteSourceSize + {88,45} + textureRect + {{264,304},{88,45}} + textureRotated + + + Explosion2_8.png + + aliases + + spriteOffset + {0,0} + spriteSize + {88,45} + spriteSourceSize + {88,45} + textureRect + {{352,304},{88,45}} + textureRotated + + + Explosion2_9.png + + aliases + + spriteOffset + {0,0} + spriteSize + {88,45} + spriteSourceSize + {88,45} + textureRect + {{456,352},{88,45}} + textureRotated + + + Explosion3_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {154,152} + spriteSourceSize + {154,152} + textureRect + {{0,0},{154,152}} + textureRotated + + + Explosion3_10.png + + aliases + + spriteOffset + {0,0} + spriteSize + {154,152} + spriteSourceSize + {154,152} + textureRect + {{154,0},{154,152}} + textureRotated + + + Explosion3_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {154,152} + spriteSourceSize + {154,152} + textureRect + {{308,0},{154,152}} + textureRotated + + + Explosion3_3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {154,152} + spriteSourceSize + {154,152} + textureRect + {{0,152},{154,152}} + textureRotated + + + Explosion3_4.png + + aliases + + spriteOffset + {0,0} + spriteSize + {154,152} + spriteSourceSize + {154,152} + textureRect + {{154,152},{154,152}} + textureRotated + + + Explosion3_5.png + + aliases + + spriteOffset + {0,0} + spriteSize + {154,152} + spriteSourceSize + {154,152} + textureRect + {{308,152},{154,152}} + textureRotated + + + Explosion3_6.png + + aliases + + spriteOffset + {0,0} + spriteSize + {154,152} + spriteSourceSize + {154,152} + textureRect + {{0,352},{154,152}} + textureRotated + + + Explosion3_7.png + + aliases + + spriteOffset + {0,0} + spriteSize + {154,152} + spriteSourceSize + {154,152} + textureRect + {{152,349},{154,152}} + textureRotated + + + Explosion3_8.png + + aliases + + spriteOffset + {0,0} + spriteSize + {154,152} + spriteSourceSize + {154,152} + textureRect + {{201,503},{154,152}} + textureRotated + + + Explosion3_9.png + + aliases + + spriteOffset + {0,0} + spriteSize + {154,152} + spriteSourceSize + {154,152} + textureRect + {{304,349},{154,152}} + textureRotated + + + + metadata + + format + 3 + pixelFormat + RGBA8888 + premultiplyAlpha + + realTextureFileName + MeleeExplosions.png + size + {507,655} + smartupdate + $TexturePacker:SmartUpdate:6c1498ee6f30bdad4abeb6a9f6af8367:4c81e1a1720f2ad3535ac93f1b42991f:d9b184ec81b83b14db5cf31d298727df$ + textureFileName + MeleeExplosions.png + + + diff --git a/frontend/assets/resources/animation/Explosion/MeleeExplosions.plist.meta b/frontend/assets/resources/animation/Explosion/MeleeExplosions.plist.meta new file mode 100644 index 0000000..3bc3556 --- /dev/null +++ b/frontend/assets/resources/animation/Explosion/MeleeExplosions.plist.meta @@ -0,0 +1,672 @@ +{ + "ver": "1.2.4", + "uuid": "1c4c1dcb-54af-485b-9119-abd6d6d84526", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "size": { + "width": 507, + "height": 655 + }, + "type": "Texture Packer", + "subMetas": { + "Explosion1_1.png": { + "ver": "1.0.4", + "uuid": "ab4866e8-ce52-4bc1-be19-b03687acf0d6", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 506, + "width": 71, + "height": 67, + "rawWidth": 71, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion1_10.png": { + "ver": "1.0.4", + "uuid": "af4f9c62-4c7e-43a4-b9b3-dd3effbbbafb", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 577, + "width": 71, + "height": 67, + "rawWidth": 71, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion1_2.png": { + "ver": "1.0.4", + "uuid": "67cc8a51-0ebe-49db-a941-7aabc5655ecf", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 67, + "trimY": 506, + "width": 71, + "height": 67, + "rawWidth": 71, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion1_3.png": { + "ver": "1.0.4", + "uuid": "367592d0-3566-4b6a-8707-01d6a8dbe34a", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 67, + "trimY": 577, + "width": 71, + "height": 67, + "rawWidth": 71, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion1_4.png": { + "ver": "1.0.4", + "uuid": "cc336b1e-b5d8-4a89-96fc-7ada0e232389", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 134, + "trimY": 506, + "width": 71, + "height": 67, + "rawWidth": 71, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion1_5.png": { + "ver": "1.0.4", + "uuid": "a457cc63-08bd-4cfa-b84a-7287d0343ecf", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 134, + "trimY": 577, + "width": 71, + "height": 67, + "rawWidth": 71, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion1_6.png": { + "ver": "1.0.4", + "uuid": "89697d35-cde3-4392-a231-db91d4ede29b", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 355, + "trimY": 503, + "width": 71, + "height": 67, + "rawWidth": 71, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion1_7.png": { + "ver": "1.0.4", + "uuid": "3815bf7a-0a48-40e0-b791-0a0be9ec0da6", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 426, + "trimY": 503, + "width": 71, + "height": 67, + "rawWidth": 71, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion1_8.png": { + "ver": "1.0.4", + "uuid": "20e691ee-a0c0-4710-8981-8dee1911e819", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 355, + "trimY": 570, + "width": 71, + "height": 67, + "rawWidth": 71, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion1_9.png": { + "ver": "1.0.4", + "uuid": "94e678c5-0780-4f2b-bf3b-86c6c0a75c23", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 422, + "trimY": 570, + "width": 71, + "height": 67, + "rawWidth": 71, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion2_1.png": { + "ver": "1.0.4", + "uuid": "89e54317-7835-4d4c-9c04-579da8b33c54", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 462, + "trimY": 0, + "width": 88, + "height": 45, + "rawWidth": 88, + "rawHeight": 45, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion2_10.png": { + "ver": "1.0.4", + "uuid": "c032eb65-fdf3-41e6-b868-d95df34168df", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 462, + "trimY": 88, + "width": 88, + "height": 45, + "rawWidth": 88, + "rawHeight": 45, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion2_2.png": { + "ver": "1.0.4", + "uuid": "2a186e00-a0c5-4c8a-b0ab-c84d56dcee7c", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 462, + "trimY": 176, + "width": 88, + "height": 45, + "rawWidth": 88, + "rawHeight": 45, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion2_3.png": { + "ver": "1.0.4", + "uuid": "083168e3-6ccc-4c5b-a800-2554bffc67d4", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 462, + "trimY": 264, + "width": 88, + "height": 45, + "rawWidth": 88, + "rawHeight": 45, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion2_4.png": { + "ver": "1.0.4", + "uuid": "d4b12ec9-6f04-493c-91e5-22b1a212262a", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 304, + "width": 88, + "height": 45, + "rawWidth": 88, + "rawHeight": 45, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion2_5.png": { + "ver": "1.0.4", + "uuid": "13038788-b0f9-4714-960b-c98619a0d0ce", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 88, + "trimY": 304, + "width": 88, + "height": 45, + "rawWidth": 88, + "rawHeight": 45, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion2_6.png": { + "ver": "1.0.4", + "uuid": "94c21ed7-94a2-47a4-9537-fe5d9c51d7b0", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 176, + "trimY": 304, + "width": 88, + "height": 45, + "rawWidth": 88, + "rawHeight": 45, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion2_7.png": { + "ver": "1.0.4", + "uuid": "d5340298-923c-4bd7-9fd7-7a2e029a2b44", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 264, + "trimY": 304, + "width": 88, + "height": 45, + "rawWidth": 88, + "rawHeight": 45, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion2_8.png": { + "ver": "1.0.4", + "uuid": "c4b145c0-0145-4e09-8559-9ef508d95be8", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 352, + "trimY": 304, + "width": 88, + "height": 45, + "rawWidth": 88, + "rawHeight": 45, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion2_9.png": { + "ver": "1.0.4", + "uuid": "79398d4d-305e-4987-b199-d9d9649cf490", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 456, + "trimY": 352, + "width": 88, + "height": 45, + "rawWidth": 88, + "rawHeight": 45, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion3_1.png": { + "ver": "1.0.4", + "uuid": "84e28787-c6cb-435b-8f59-20d9afe6bf3a", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 154, + "height": 152, + "rawWidth": 154, + "rawHeight": 152, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion3_10.png": { + "ver": "1.0.4", + "uuid": "20d9ce6b-d9ab-4402-8c59-770ad0adf570", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 154, + "trimY": 0, + "width": 154, + "height": 152, + "rawWidth": 154, + "rawHeight": 152, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion3_2.png": { + "ver": "1.0.4", + "uuid": "0654601f-6788-4a2c-aed4-8dfbe1c5fdd0", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 308, + "trimY": 0, + "width": 154, + "height": 152, + "rawWidth": 154, + "rawHeight": 152, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion3_3.png": { + "ver": "1.0.4", + "uuid": "0913e11a-c796-4b58-94cf-f70b3869deff", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 152, + "width": 154, + "height": 152, + "rawWidth": 154, + "rawHeight": 152, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion3_4.png": { + "ver": "1.0.4", + "uuid": "d6b58622-2cc3-4ee6-a34f-1a18deb73700", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 154, + "trimY": 152, + "width": 154, + "height": 152, + "rawWidth": 154, + "rawHeight": 152, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion3_5.png": { + "ver": "1.0.4", + "uuid": "b83c6261-b86f-4323-ad11-7375cac02a2b", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 308, + "trimY": 152, + "width": 154, + "height": 152, + "rawWidth": 154, + "rawHeight": 152, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion3_6.png": { + "ver": "1.0.4", + "uuid": "b458c047-b7b5-4476-996e-d4c1ca85ef9c", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 352, + "width": 154, + "height": 152, + "rawWidth": 154, + "rawHeight": 152, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion3_7.png": { + "ver": "1.0.4", + "uuid": "3971256a-8120-448e-8adf-de8d67dedfd3", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 152, + "trimY": 349, + "width": 154, + "height": 152, + "rawWidth": 154, + "rawHeight": 152, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion3_8.png": { + "ver": "1.0.4", + "uuid": "0e548d92-36c8-4795-b3dc-2bc2cfcd7170", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 201, + "trimY": 503, + "width": 154, + "height": 152, + "rawWidth": 154, + "rawHeight": 152, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Explosion3_9.png": { + "ver": "1.0.4", + "uuid": "25f94245-87b0-4954-abab-c817c80fed37", + "rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 304, + "trimY": 349, + "width": 154, + "height": 152, + "rawWidth": 154, + "rawHeight": 152, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/Explosion/MeleeExplosions.png b/frontend/assets/resources/animation/Explosion/MeleeExplosions.png new file mode 100644 index 0000000..f786976 Binary files /dev/null and b/frontend/assets/resources/animation/Explosion/MeleeExplosions.png differ diff --git a/frontend/assets/resources/animation/Explosion/MeleeExplosions.png.meta b/frontend/assets/resources/animation/Explosion/MeleeExplosions.png.meta new file mode 100644 index 0000000..149d495 --- /dev/null +++ b/frontend/assets/resources/animation/Explosion/MeleeExplosions.png.meta @@ -0,0 +1,12 @@ +{ + "ver": "2.3.3", + "uuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb", + "type": "raw", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "platformSettings": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/map/dungeon/map.tmx b/frontend/assets/resources/map/dungeon/map.tmx index 667824f..9fa707b 100644 --- a/frontend/assets/resources/map/dungeon/map.tmx +++ b/frontend/assets/resources/map/dungeon/map.tmx @@ -9,10 +9,10 @@ - + - + diff --git a/frontend/assets/resources/pbfiles/room_downsync_frame.proto b/frontend/assets/resources/pbfiles/room_downsync_frame.proto index dc11f4b..bd3fa8a 100644 --- a/frontend/assets/resources/pbfiles/room_downsync_frame.proto +++ b/frontend/assets/resources/pbfiles/room_downsync_frame.proto @@ -6,11 +6,11 @@ import "geometry.proto"; // The import path here is only w.r.t. the proto file, message PlayerDownsync { int32 id = 1; - int32 virtualGridX = 2; - int32 virtualGridY = 3; + int32 virtualGridX = 2; + int32 virtualGridY = 3; int32 dirX = 4; int32 dirY = 5; // "dirX" and "dirY" determines character facing - int32 velX = 6; + int32 velX = 6; int32 velY = 7; // "velX" and "velY" is used to record the accumulated effect by accelerations (including gravity) int32 speed = 8; // this is the instantaneous scalar attribute of a character, different from but will be accounted in "velX" and "velY" int32 battleState = 9; @@ -60,97 +60,106 @@ message InputFrameDownsync { } message HeartbeatUpsync { - int64 clientTimestamp = 1; + int64 clientTimestamp = 1; } message WsReq { int32 msgId = 1; int32 playerId = 2; - int32 act = 3; + int32 act = 3; int32 joinIndex = 4; int32 ackingFrameId = 5; int32 ackingInputFrameId = 6; - repeated InputFrameUpsync inputFrameUpsyncBatch = 7; - HeartbeatUpsync hb = 8; + repeated InputFrameUpsync inputFrameUpsyncBatch = 7; + HeartbeatUpsync hb = 8; } message WsResp { int32 ret = 1; - int32 echoedMsgId = 2; - int32 act = 3; - RoomDownsyncFrame rdf = 4; + int32 echoedMsgId = 2; + int32 act = 3; + RoomDownsyncFrame rdf = 4; repeated InputFrameDownsync inputFrameDownsyncBatch = 5; - BattleColliderInfo bciFrame = 6; + BattleColliderInfo bciFrame = 6; } message InputsBufferSnapshot { - int32 refRenderFrameId = 1; + int32 refRenderFrameId = 1; uint64 unconfirmedMask = 2; repeated InputFrameDownsync toSendInputFrameDownsyncs = 3; bool shouldForceResync = 4; } -message MeleeBullet { +message MeleeBullet { // Jargon reference https://www.thegamer.com/fighting-games-frame-data-explained/ // ALL lengths are in world coordinate // for offender - int32 originatedRenderFrameId = 1; - int32 offenderJoinIndex = 2; + int32 originatedRenderFrameId = 1; + int32 offenderJoinIndex = 2; - int32 startupFrames = 3; + int32 startupFrames = 3; int32 cancellableStFrame = 4; int32 cancellableEdFrame = 5; - int32 activeFrames = 6; + int32 activeFrames = 6; - int32 hitStunFrames = 7; - int32 blockStunFrames = 8; - int32 pushbackVelX = 9; - int32 pushbackVelY = 10; - int32 damage = 11; + int32 hitStunFrames = 7; + int32 blockStunFrames = 8; + int32 pushbackVelX = 9; + int32 pushbackVelY = 10; + int32 damage = 11; - int32 selfLockVelX = 12; - int32 selfLockVelY = 13; + int32 selfLockVelX = 12; + int32 selfLockVelY = 13; - int32 hitboxOffsetX = 14; - int32 hitboxOffsetY = 15; - int32 hitboxSizeX = 16; + int32 hitboxOffsetX = 14; + int32 hitboxOffsetY = 15; + int32 hitboxSizeX = 16; int32 hitboxSizeY = 17; bool blowUp = 18; int32 teamId = 19; - int32 bulletLocalId = 20; -} + int32 bulletLocalId = 20; + int32 speciesId = 21; + int32 explosionFrames = 22; -message FireballBullet { - int32 originatedRenderFrameId = 1; - int32 offenderJoinIndex = 2; + int32 blState = 23; + int32 framesInBlState = 24; +} - int32 startupFrames = 3; +message FireballBullet { + int32 originatedRenderFrameId = 1; + int32 offenderJoinIndex = 2; + + int32 startupFrames = 3; int32 cancellableStFrame = 4; int32 cancellableEdFrame = 5; - int32 activeFrames = 6; + int32 activeFrames = 6; - int32 hitStunFrames = 7; - int32 blockStunFrames = 8; - int32 pushbackVelX = 9; - int32 pushbackVelY = 10; - int32 damage = 11; + int32 hitStunFrames = 7; + int32 blockStunFrames = 8; + int32 pushbackVelX = 9; + int32 pushbackVelY = 10; + int32 damage = 11; - int32 selfLockVelX = 12; - int32 selfLockVelY = 13; + int32 selfLockVelX = 12; + int32 selfLockVelY = 13; - int32 hitboxOffsetX = 14; - int32 hitboxOffsetY = 15; - int32 hitboxSizeX = 16; + int32 hitboxOffsetX = 14; + int32 hitboxOffsetY = 15; + int32 hitboxSizeX = 16; int32 hitboxSizeY = 17; bool blowUp = 18; int32 teamId = 19; - int32 bulletLocalId = 20; - int32 speciesId = 21; + int32 bulletLocalId = 20; + int32 speciesId = 21; + int32 explosionFrames = 22; + + int32 blState = 23; + int32 framesInBlState = 24; int32 virtualGridX = 999; int32 virtualGridY = 1000; @@ -159,20 +168,20 @@ message FireballBullet { int32 velX = 1003; int32 velY = 1004; int32 speed = 1005; -} +} message BattleColliderInfo { string stageName = 1; - int32 intervalToPing = 2; + int32 intervalToPing = 2; int32 willKickIfInactiveFor = 3; - int32 boundRoomId = 4; - int64 battleDurationNanos = 5; - int32 inputFrameUpsyncDelayTolerance = 6; + int32 boundRoomId = 4; + int64 battleDurationNanos = 5; + int32 inputFrameUpsyncDelayTolerance = 6; int32 maxChasingRenderFramesPerUpdate = 7; double rollbackEstimatedDtMillis = 8; int64 rollbackEstimatedDtNanos = 9; - + int32 renderCacheSize = 10; double spaceOffsetX = 11; double spaceOffsetY = 12; @@ -186,7 +195,7 @@ message RoomDownsyncFrame { repeated PlayerDownsync playersArr = 2; int64 countdownNanos = 3; repeated MeleeBullet meleeBullets = 4; // I don't know how to mimic inheritance/composition in protobuf by far, thus using an array for each type of bullet as a compromise - repeated FireballBullet fireballBullets = 5; + repeated FireballBullet fireballBullets = 5; uint64 backendUnconfirmedMask = 1024; // Indexed by "joinIndex", same compression concern as stated in InputFrameDownsync bool shouldForceResync = 1025; diff --git a/frontend/assets/resources/prefabs/Fireball.prefab b/frontend/assets/resources/prefabs/Fireball.prefab index cd0a845..ed419e1 100644 --- a/frontend/assets/resources/prefabs/Fireball.prefab +++ b/frontend/assets/resources/prefabs/Fireball.prefab @@ -24,11 +24,11 @@ "_active": true, "_components": [ { - "__id__": 8 + "__id__": 12 } ], "_prefab": { - "__id__": 9 + "__id__": 13 }, "_opacity": 255, "_color": { @@ -87,12 +87,15 @@ "_children": [ { "__id__": 3 + }, + { + "__id__": 7 } ], "_active": true, "_components": [], "_prefab": { - "__id__": 7 + "__id__": 11 }, "_opacity": 255, "_color": { @@ -254,6 +257,9 @@ "_clips": [ { "__uuid__": "ba12416b-eec3-4260-8402-7fc25b125624" + }, + { + "__uuid__": "7941215a-2b8c-4798-954b-4f1b16d5f6f5" } ], "playOnLoad": false, @@ -270,6 +276,135 @@ "fileId": "5f1s6pDt5F3rknJTu0gQW7", "sync": false }, + { + "__type__": "cc.Node", + "_name": "MeleeExplosion", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 8 + }, + { + "__id__": 9 + } + ], + "_prefab": { + "__id__": 10 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 24, + 8, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 7 + }, + "_enabled": true, + "_defaultClip": null, + "_clips": [ + { + "__uuid__": "954a2924-89df-4df4-93fc-36d2b22e7619" + }, + { + "__uuid__": "5bd304eb-c8ba-426f-a9ab-5698ac62de85" + }, + { + "__uuid__": "5054633c-a588-4506-b4ac-eef29b1d8511" + } + ], + "playOnLoad": false, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 7 + }, + "_enabled": true, + "_materials": [], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "1c4c1dcb-54af-485b-9119-abd6d6d84526" + }, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "d92d4831-cd65-4eb5-90bd-b77021aec35b" + }, + "fileId": "fd9jQiClRJSI00917fifB8", + "sync": false + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/frontend/assets/scenes/login.fire b/frontend/assets/scenes/login.fire index 6324f99..8ac97cc 100644 --- a/frontend/assets/scenes/login.fire +++ b/frontend/assets/scenes/login.fire @@ -440,7 +440,7 @@ "array": [ 0, 0, - 209.57814771583418, + 217.50722273720794, 0, 0, 0, diff --git a/frontend/assets/scenes/offline_map.fire b/frontend/assets/scenes/offline_map.fire index 989043c..a7293f2 100644 --- a/frontend/assets/scenes/offline_map.fire +++ b/frontend/assets/scenes/offline_map.fire @@ -464,7 +464,7 @@ "array": [ 0, 0, - 209.57814771583418, + 211.36523796872766, 0, 0, 0, diff --git a/frontend/assets/scripts/Bullet.js b/frontend/assets/scripts/Bullet.js new file mode 100644 index 0000000..bf073f6 --- /dev/null +++ b/frontend/assets/scripts/Bullet.js @@ -0,0 +1,36 @@ +window.BULLET_STATE = { + Startup: 0, + Active: 1, + Exploding: 2, +}; + +cc.Class({ + extends: cc.Component, + + properties: { + animNode: { + type: cc.Node, + default: null + }, + }, + + updateAnim(newAnimName, frameIdxInAnim, dirX, spontaneousLooping, rdf, newAnimIdx) { + this.animComp = this.effAnimNode.getComponent(cc.Animation); + // Update directions + if (this.animComp && this.animComp.node) { + if (0 > dirX) { + this.animNode.scaleX = (-1.0); + } else if (0 < dirX) { + this.animNode.scaleX = (1.0); + } + } + + const currentClip = this.animComp.currentClip; + if (true == spontaneousLooping && (null != currentClip && currentClip.name == newAnimName)) { + return; + } + const targetClip = this.animComp.getClips()[newAnimIdx]; + let fromTime = (frameIdxInAnim / targetClip.sample); // TODO: Anyway to avoid using division here? + this.animComp.play(newAnimName, fromTime); + }, +}); diff --git a/frontend/assets/scripts/Bullet.js.meta b/frontend/assets/scripts/Bullet.js.meta new file mode 100644 index 0000000..2a90b0a --- /dev/null +++ b/frontend/assets/scripts/Bullet.js.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.0.5", + "uuid": "a4b909c4-56a8-4b70-b6ea-b7f928077747", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/scripts/Fireball.js b/frontend/assets/scripts/Fireball.js index 5d89feb..cc4366c 100644 --- a/frontend/assets/scripts/Fireball.js +++ b/frontend/assets/scripts/Fireball.js @@ -1,12 +1,7 @@ -cc.Class({ - extends: cc.Component, +const Bullet = require("./Bullet"); - properties: { - animNode: { - type: cc.Node, - default: null - }, - }, +cc.Class({ + extends: Bullet, ctor() { this.lastUsed = -1; @@ -27,22 +22,8 @@ cc.Class({ this.speciesName = speciesName; this.effAnimNode = this.animNode.getChildByName(this.speciesName); this.effAnimNode.active = true; - this.updateAnim(speciesName, fireballBullet, rdf); }, onLoad() {}, - updateAnim(speciesName, fireballBullet, rdf) { - this.animComp = this.effAnimNode.getComponent(cc.Animation); - // Update directions - if (this.animComp && this.animComp.node) { - if (0 > fireballBullet.DirX) { - this.animNode.scaleX = (-1.0); - } else if (0 < fireballBullet.DirX) { - this.animNode.scaleX = (1.0); - } - } - - this.animComp.play(speciesName); - }, }); diff --git a/frontend/assets/scripts/Map.js b/frontend/assets/scripts/Map.js index 9fc81a5..3393bcc 100644 --- a/frontend/assets/scripts/Map.js +++ b/frontend/assets/scripts/Map.js @@ -613,13 +613,13 @@ cc.Class({ const jsMeleeBulletsArr = new Array(pbRdf.meleeBullets.length).fill(null); for (let k = 0; k < pbRdf.meleeBullets.length; ++k) { const pbBullet = pbRdf.meleeBullets[k]; - const jsMeleeBullet = gopkgs.NewMeleeBulletJs(pbBullet.bulletLocalId, pbBullet.originatedRenderFrameId, pbBullet.offenderJoinIndex, pbBullet.startupFrames, pbBullet.cancellableStFrame, pbBullet.cancellableEdFrame, pbBullet.activeFrames, pbBullet.hitStunFrames, pbBullet.blockStunFrames, pbBullet.pushbackVelX, pbBullet.pushbackVelY, pbBullet.damage, pbBullet.selfLockVelX, pbBullet.selfLockVelY, pbBullet.hitboxOffsetX, pbBullet.hitboxOffsetY, pbBullet.hitboxSizeX, pbBullet.hitboxSizeY, pbBullet.blowUp, pbBullet.teamId); + const jsMeleeBullet = gopkgs.NewMeleeBulletJs(pbBullet.bulletLocalId, pbBullet.originatedRenderFrameId, pbBullet.offenderJoinIndex, pbBullet.startupFrames, pbBullet.cancellableStFrame, pbBullet.cancellableEdFrame, pbBullet.activeFrames, pbBullet.hitStunFrames, pbBullet.blockStunFrames, pbBullet.pushbackVelX, pbBullet.pushbackVelY, pbBullet.damage, pbBullet.selfLockVelX, pbBullet.selfLockVelY, pbBullet.hitboxOffsetX, pbBullet.hitboxOffsetY, pbBullet.hitboxSizeX, pbBullet.hitboxSizeY, pbBullet.blowUp, pbBullet.teamId, pbBullet.blState, pbBullet.framesInBlState, pbBullet.explosionFrames, pbBullet.speciesId); jsMeleeBulletsArr[k] = jsMeleeBullet; } const jsFireballBulletsArr = new Array(pbRdf.fireballBullets.length).fill(null); for (let k = 0; k < pbRdf.fireballBullets.length; ++k) { const pbBullet = pbRdf.fireballBullets[k]; - const jsFireballBullet = gopkgs.NewFireballBulletJs(pbBullet.bulletLocalId, pbBullet.originatedRenderFrameId, pbBullet.offenderJoinIndex, pbBullet.startupFrames, pbBullet.cancellableStFrame, pbBullet.cancellableEdFrame, pbBullet.activeFrames, pbBullet.hitStunFrames, pbBullet.blockStunFrames, pbBullet.pushbackVelX, pbBullet.pushbackVelY, pbBullet.damage, pbBullet.selfLockVelX, pbBullet.selfLockVelY, pbBullet.hitboxOffsetX, pbBullet.hitboxOffsetY, pbBullet.hitboxSizeX, pbBullet.hitboxSizeY, pbBullet.blowUp, pbBullet.teamId, pbBullet.virtualGridX, pbBullet.virtualGridY, pbBullet.dirX, pbBullet.dirY, pbBullet.velX, pbBullet.velY, pbBullet.speed, pbBullet.speciesId); + const jsFireballBullet = gopkgs.NewFireballBulletJs(pbBullet.bulletLocalId, pbBullet.originatedRenderFrameId, pbBullet.offenderJoinIndex, pbBullet.startupFrames, pbBullet.cancellableStFrame, pbBullet.cancellableEdFrame, pbBullet.activeFrames, pbBullet.hitStunFrames, pbBullet.blockStunFrames, pbBullet.pushbackVelX, pbBullet.pushbackVelY, pbBullet.damage, pbBullet.selfLockVelX, pbBullet.selfLockVelY, pbBullet.hitboxOffsetX, pbBullet.hitboxOffsetY, pbBullet.hitboxSizeX, pbBullet.hitboxSizeY, pbBullet.blowUp, pbBullet.teamId, pbBullet.virtualGridX, pbBullet.virtualGridY, pbBullet.dirX, pbBullet.dirY, pbBullet.velX, pbBullet.velY, pbBullet.speed, pbBullet.blState, pbBullet.framesInBlState, pbBullet.explosionFrames, pbBullet.speciesId); jsFireballBulletsArr[k] = jsFireballBullet; } @@ -763,7 +763,6 @@ cc.Class({ if (lhs.VelX != rhs.VelX) return false; if (lhs.VelY != rhs.VelY) return false; if (lhs.Speed != rhs.Speed) return false; - if (lhs.SpeciesId != rhs.SpeciesId) return false; return true; }, @@ -1114,25 +1113,61 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame const fireball = pqNode.value; fireball.node.setPosition(cc.v2(Number.MAX_VALUE, Number.MAX_VALUE)); } + for (let k in rdf.MeleeBullets) { + const meleeBullet = rdf.MeleeBullets[k]; + const isExploding = (window.BULLET_STATE.Exploding == meleeBullet.BlState); + if (isExploding) { + let pqNode = self.cachedFireballs.popAny(meleeBullet.BattleAttr.BulletLocalId); + let speciesName = `MeleeExplosion`; + let animName = `MeleeExplosion${meleeBullet.Bullet.SpeciesId}`; + + const offender = rdf.PlayersArr[meleeBullet.BattleAttr.OffenderJoinIndex - 1]; + let xfac = 1; // By now, straight Punch offset doesn't respect "y-axis" + if (0 > offender.DirX) { + xfac = -1; + } + const [wx, wy] = gopkgs.VirtualGridToWorldPos(offender.VirtualGridX + xfac * meleeBullet.Bullet.HitboxOffsetX, offender.VirtualGridY); + + if (null == pqNode) { + pqNode = self.cachedFireballs.pop(); + //console.log(`@rdf.Id=${rdf.Id}, origRdfId=${meleeBullet.BattleAttr.OriginatedRenderFrameId}, startupFrames=${meleeBullet.Bullet.StartupFrames}, using a new fireball node for rendering for bulletLocalId=${meleeBullet.BattleAttr.BulletLocalId} at wpos=(${wx},${wy})`); + } else { + //console.log(`@rdf.Id=${rdf.Id}, origRdfId=${meleeBullet.BattleAttr.OriginatedRenderFrameId}, startupFrames=${meleeBullet.Bullet.StartupFrames}, using a cached fireball node for rendering for bulletLocalId=${meleeBullet.BattleAttr.BulletLocalId} at wpos=(${wx},${wy})`); + } + const cachedFireball = pqNode.value; + cachedFireball.setSpecies(speciesName, meleeBullet, rdf); + const newAnimIdx = meleeBullet.Bullet.SpeciesId - 1; + cachedFireball.updateAnim(animName, meleeBullet.FramesInBlState, offender.DirX, false, rdf, newAnimIdx); + cachedFireball.lastUsed = self.renderFrameId; + cachedFireball.bulletLocalId = meleeBullet.BattleAttr.BulletLocalId; + cachedFireball.node.setPosition(cc.v2(wx, wy)); + + self.cachedFireballs.push(cachedFireball.lastUsed, cachedFireball, meleeBullet.BattleAttr.BulletLocalId); + } else { + //console.log(`@rdf.Id=${rdf.Id}, origRdfId=${meleeBullet.BattleAttr.OriginatedRenderFrameId}, startupFrames=${meleeBullet.Bullet.StartupFrames}, activeFrames=${meleeBullet.Bullet.ActiveFrames}, not rendering melee node for bulletLocalId=${meleeBullet.BattleAttr.BulletLocalId}`); + } + } for (let k in rdf.FireballBullets) { const fireballBullet = rdf.FireballBullets[k]; - if ( - fireballBullet.BattleAttr.OriginatedRenderFrameId + fireballBullet.Bullet.StartupFrames <= rdf.Id - && - fireballBullet.BattleAttr.OriginatedRenderFrameId + fireballBullet.Bullet.StartupFrames + fireballBullet.Bullet.ActiveFrames > rdf.Id - ) { + const isExploding = (window.BULLET_STATE.Exploding == fireballBullet.BlState); + if (gopkgs.IsFireballBulletActive(fireballBullet, rdf) || isExploding) { let pqNode = self.cachedFireballs.popAny(fireballBullet.BattleAttr.BulletLocalId); - const speciesName = `Fireball${fireballBullet.SpeciesId}`; + let speciesName = `Fireball${fireballBullet.Bullet.SpeciesId}`; + let animName = (BULLET_STATE.Exploding == fireballBullet.BlState ? `Fireball${fireballBullet.Bullet.SpeciesId}Explosion` : speciesName); + const [wx, wy] = gopkgs.VirtualGridToWorldPos(fireballBullet.VirtualGridX, fireballBullet.VirtualGridY); if (null == pqNode) { pqNode = self.cachedFireballs.pop(); - //console.log(`@rdf.Id=${rdf.Id}, origRdfId=${fireballBullet.BattleAttr.OriginatedRenderFrameId}, startupFrames=${fireballBullet.Bullet.StartupFrames}, using a new fireball node for rendering for bulletLocalId=${fireballBullet.BattleAttr.BulletLocalId} at wpos=(${wx},${wy})`); + //console.log(`@rdf.Id=${rdf.Id}, origRdfId=${fireballBullet.BattleAttr.OriginatedRenderFrameId}, startupFrames=${fireballBullet.Bullet.StartupFrames}, using a new fireball node for rendering for bulletLocalId=${fireballBullet.BattleAttr.BulletLocalId} at wpos=(${wx},${wy})`); } else { //console.log(`@rdf.Id=${rdf.Id}, origRdfId=${fireballBullet.BattleAttr.OriginatedRenderFrameId}, startupFrames=${fireballBullet.Bullet.StartupFrames}, using a cached fireball node for rendering for bulletLocalId=${fireballBullet.BattleAttr.BulletLocalId} at wpos=(${wx},${wy})`); } const cachedFireball = pqNode.value; cachedFireball.setSpecies(speciesName, fireballBullet, rdf); + const spontaneousLooping = !isExploding; + const newAnimIdx = (spontaneousLooping ? 0 : 1); + cachedFireball.updateAnim(animName, fireballBullet.FramesInBlState, fireballBullet.DirX, spontaneousLooping, rdf, newAnimIdx); cachedFireball.lastUsed = self.renderFrameId; cachedFireball.bulletLocalId = fireballBullet.BattleAttr.BulletLocalId; cachedFireball.node.setPosition(cc.v2(wx, wy)); @@ -1363,11 +1398,7 @@ actuallyUsedinputList:{${self.inputFrameDownsyncStr(actuallyUsedInputClone)}}`); for (let k in rdf.MeleeBullets) { const meleeBullet = rdf.MeleeBullets[k]; - if ( - meleeBullet.BattleAttr.OriginatedRenderFrameId + meleeBullet.Bullet.StartupFrames <= rdf.Id - && - meleeBullet.BattleAttr.OriginatedRenderFrameId + meleeBullet.Bullet.StartupFrames + meleeBullet.Bullet.ActiveFrames > rdf.Id - ) { + if (gopkgs.IsMeleeBulletActive(meleeBullet, rdf)) { const offender = rdf.PlayersArr[meleeBullet.BattleAttr.OffenderJoinIndex - 1]; if (1 == offender.JoinIndex) { g2.strokeColor = cc.Color.BLUE; @@ -1395,11 +1426,7 @@ actuallyUsedinputList:{${self.inputFrameDownsyncStr(actuallyUsedInputClone)}}`); for (let k in rdf.FireballBullets) { const fireballBullet = rdf.FireballBullets[k]; - if ( - fireballBullet.BattleAttr.OriginatedRenderFrameId + fireballBullet.Bullet.StartupFrames <= rdf.Id - && - fireballBullet.BattleAttr.OriginatedRenderFrameId + fireballBullet.Bullet.StartupFrames + fireballBullet.Bullet.ActiveFrames > rdf.Id - ) { + if (gopkgs.IsFireballBulletActive(fireballBullet, rdf)) { const offender = rdf.PlayersArr[fireballBullet.BattleAttr.OffenderJoinIndex - 1]; if (1 == offender.JoinIndex) { g2.strokeColor = cc.Color.BLUE; diff --git a/frontend/assets/scripts/OfflineMap.js b/frontend/assets/scripts/OfflineMap.js index 20e96d3..5bf2649 100644 --- a/frontend/assets/scripts/OfflineMap.js +++ b/frontend/assets/scripts/OfflineMap.js @@ -13,7 +13,7 @@ cc.Class({ onLoad() { const self = this; window.mapIns = self; - self.showCriticalCoordinateLabels = true; + self.showCriticalCoordinateLabels = false; const mapNode = self.node; const canvasNode = mapNode.parent; @@ -94,7 +94,7 @@ cc.Class({ const p2Vpos = gopkgs.WorldToVirtualGridPos(boundaryObjs.playerStartingPositions[1].x, boundaryObjs.playerStartingPositions[1].y); const colliderRadiusV = gopkgs.WorldToVirtualGridPos(12.0, 0); - const speciesIdList = [4096, 1]; + const speciesIdList = [1, 4096]; const chConfigsOrderedByJoinIndex = gopkgs.GetCharacterConfigsOrderedByJoinIndex(speciesIdList); const startRdf = window.pb.protos.RoomDownsyncFrame.create({ diff --git a/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js b/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js index 21324ee..5e41996 100644 --- a/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js +++ b/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js @@ -4187,6 +4187,10 @@ $root.protos = (function() { * @property {boolean|null} [blowUp] MeleeBullet blowUp * @property {number|null} [teamId] MeleeBullet teamId * @property {number|null} [bulletLocalId] MeleeBullet bulletLocalId + * @property {number|null} [speciesId] MeleeBullet speciesId + * @property {number|null} [explosionFrames] MeleeBullet explosionFrames + * @property {number|null} [blState] MeleeBullet blState + * @property {number|null} [framesInBlState] MeleeBullet framesInBlState */ /** @@ -4364,6 +4368,38 @@ $root.protos = (function() { */ MeleeBullet.prototype.bulletLocalId = 0; + /** + * MeleeBullet speciesId. + * @member {number} speciesId + * @memberof protos.MeleeBullet + * @instance + */ + MeleeBullet.prototype.speciesId = 0; + + /** + * MeleeBullet explosionFrames. + * @member {number} explosionFrames + * @memberof protos.MeleeBullet + * @instance + */ + MeleeBullet.prototype.explosionFrames = 0; + + /** + * MeleeBullet blState. + * @member {number} blState + * @memberof protos.MeleeBullet + * @instance + */ + MeleeBullet.prototype.blState = 0; + + /** + * MeleeBullet framesInBlState. + * @member {number} framesInBlState + * @memberof protos.MeleeBullet + * @instance + */ + MeleeBullet.prototype.framesInBlState = 0; + /** * Creates a new MeleeBullet instance using the specified properties. * @function create @@ -4428,6 +4464,14 @@ $root.protos = (function() { writer.uint32(/* id 19, wireType 0 =*/152).int32(message.teamId); if (message.bulletLocalId != null && Object.hasOwnProperty.call(message, "bulletLocalId")) writer.uint32(/* id 20, wireType 0 =*/160).int32(message.bulletLocalId); + if (message.speciesId != null && Object.hasOwnProperty.call(message, "speciesId")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.speciesId); + if (message.explosionFrames != null && Object.hasOwnProperty.call(message, "explosionFrames")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.explosionFrames); + if (message.blState != null && Object.hasOwnProperty.call(message, "blState")) + writer.uint32(/* id 23, wireType 0 =*/184).int32(message.blState); + if (message.framesInBlState != null && Object.hasOwnProperty.call(message, "framesInBlState")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.framesInBlState); return writer; }; @@ -4542,6 +4586,22 @@ $root.protos = (function() { message.bulletLocalId = reader.int32(); break; } + case 21: { + message.speciesId = reader.int32(); + break; + } + case 22: { + message.explosionFrames = reader.int32(); + break; + } + case 23: { + message.blState = reader.int32(); + break; + } + case 24: { + message.framesInBlState = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4637,6 +4697,18 @@ $root.protos = (function() { if (message.bulletLocalId != null && message.hasOwnProperty("bulletLocalId")) if (!$util.isInteger(message.bulletLocalId)) return "bulletLocalId: integer expected"; + if (message.speciesId != null && message.hasOwnProperty("speciesId")) + if (!$util.isInteger(message.speciesId)) + return "speciesId: integer expected"; + if (message.explosionFrames != null && message.hasOwnProperty("explosionFrames")) + if (!$util.isInteger(message.explosionFrames)) + return "explosionFrames: integer expected"; + if (message.blState != null && message.hasOwnProperty("blState")) + if (!$util.isInteger(message.blState)) + return "blState: integer expected"; + if (message.framesInBlState != null && message.hasOwnProperty("framesInBlState")) + if (!$util.isInteger(message.framesInBlState)) + return "framesInBlState: integer expected"; return null; }; @@ -4692,6 +4764,14 @@ $root.protos = (function() { message.teamId = object.teamId | 0; if (object.bulletLocalId != null) message.bulletLocalId = object.bulletLocalId | 0; + if (object.speciesId != null) + message.speciesId = object.speciesId | 0; + if (object.explosionFrames != null) + message.explosionFrames = object.explosionFrames | 0; + if (object.blState != null) + message.blState = object.blState | 0; + if (object.framesInBlState != null) + message.framesInBlState = object.framesInBlState | 0; return message; }; @@ -4729,6 +4809,10 @@ $root.protos = (function() { object.blowUp = false; object.teamId = 0; object.bulletLocalId = 0; + object.speciesId = 0; + object.explosionFrames = 0; + object.blState = 0; + object.framesInBlState = 0; } if (message.originatedRenderFrameId != null && message.hasOwnProperty("originatedRenderFrameId")) object.originatedRenderFrameId = message.originatedRenderFrameId; @@ -4770,6 +4854,14 @@ $root.protos = (function() { object.teamId = message.teamId; if (message.bulletLocalId != null && message.hasOwnProperty("bulletLocalId")) object.bulletLocalId = message.bulletLocalId; + if (message.speciesId != null && message.hasOwnProperty("speciesId")) + object.speciesId = message.speciesId; + if (message.explosionFrames != null && message.hasOwnProperty("explosionFrames")) + object.explosionFrames = message.explosionFrames; + if (message.blState != null && message.hasOwnProperty("blState")) + object.blState = message.blState; + if (message.framesInBlState != null && message.hasOwnProperty("framesInBlState")) + object.framesInBlState = message.framesInBlState; return object; }; @@ -4829,6 +4921,9 @@ $root.protos = (function() { * @property {number|null} [teamId] FireballBullet teamId * @property {number|null} [bulletLocalId] FireballBullet bulletLocalId * @property {number|null} [speciesId] FireballBullet speciesId + * @property {number|null} [explosionFrames] FireballBullet explosionFrames + * @property {number|null} [blState] FireballBullet blState + * @property {number|null} [framesInBlState] FireballBullet framesInBlState * @property {number|null} [virtualGridX] FireballBullet virtualGridX * @property {number|null} [virtualGridY] FireballBullet virtualGridY * @property {number|null} [dirX] FireballBullet dirX @@ -5021,6 +5116,30 @@ $root.protos = (function() { */ FireballBullet.prototype.speciesId = 0; + /** + * FireballBullet explosionFrames. + * @member {number} explosionFrames + * @memberof protos.FireballBullet + * @instance + */ + FireballBullet.prototype.explosionFrames = 0; + + /** + * FireballBullet blState. + * @member {number} blState + * @memberof protos.FireballBullet + * @instance + */ + FireballBullet.prototype.blState = 0; + + /** + * FireballBullet framesInBlState. + * @member {number} framesInBlState + * @memberof protos.FireballBullet + * @instance + */ + FireballBullet.prototype.framesInBlState = 0; + /** * FireballBullet virtualGridX. * @member {number} virtualGridX @@ -5143,6 +5262,12 @@ $root.protos = (function() { writer.uint32(/* id 20, wireType 0 =*/160).int32(message.bulletLocalId); if (message.speciesId != null && Object.hasOwnProperty.call(message, "speciesId")) writer.uint32(/* id 21, wireType 0 =*/168).int32(message.speciesId); + if (message.explosionFrames != null && Object.hasOwnProperty.call(message, "explosionFrames")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.explosionFrames); + if (message.blState != null && Object.hasOwnProperty.call(message, "blState")) + writer.uint32(/* id 23, wireType 0 =*/184).int32(message.blState); + if (message.framesInBlState != null && Object.hasOwnProperty.call(message, "framesInBlState")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.framesInBlState); if (message.virtualGridX != null && Object.hasOwnProperty.call(message, "virtualGridX")) writer.uint32(/* id 999, wireType 0 =*/7992).int32(message.virtualGridX); if (message.virtualGridY != null && Object.hasOwnProperty.call(message, "virtualGridY")) @@ -5275,6 +5400,18 @@ $root.protos = (function() { message.speciesId = reader.int32(); break; } + case 22: { + message.explosionFrames = reader.int32(); + break; + } + case 23: { + message.blState = reader.int32(); + break; + } + case 24: { + message.framesInBlState = reader.int32(); + break; + } case 999: { message.virtualGridX = reader.int32(); break; @@ -5401,6 +5538,15 @@ $root.protos = (function() { if (message.speciesId != null && message.hasOwnProperty("speciesId")) if (!$util.isInteger(message.speciesId)) return "speciesId: integer expected"; + if (message.explosionFrames != null && message.hasOwnProperty("explosionFrames")) + if (!$util.isInteger(message.explosionFrames)) + return "explosionFrames: integer expected"; + if (message.blState != null && message.hasOwnProperty("blState")) + if (!$util.isInteger(message.blState)) + return "blState: integer expected"; + if (message.framesInBlState != null && message.hasOwnProperty("framesInBlState")) + if (!$util.isInteger(message.framesInBlState)) + return "framesInBlState: integer expected"; if (message.virtualGridX != null && message.hasOwnProperty("virtualGridX")) if (!$util.isInteger(message.virtualGridX)) return "virtualGridX: integer expected"; @@ -5479,6 +5625,12 @@ $root.protos = (function() { message.bulletLocalId = object.bulletLocalId | 0; if (object.speciesId != null) message.speciesId = object.speciesId | 0; + if (object.explosionFrames != null) + message.explosionFrames = object.explosionFrames | 0; + if (object.blState != null) + message.blState = object.blState | 0; + if (object.framesInBlState != null) + message.framesInBlState = object.framesInBlState | 0; if (object.virtualGridX != null) message.virtualGridX = object.virtualGridX | 0; if (object.virtualGridY != null) @@ -5531,6 +5683,9 @@ $root.protos = (function() { object.teamId = 0; object.bulletLocalId = 0; object.speciesId = 0; + object.explosionFrames = 0; + object.blState = 0; + object.framesInBlState = 0; object.virtualGridX = 0; object.virtualGridY = 0; object.dirX = 0; @@ -5581,6 +5736,12 @@ $root.protos = (function() { object.bulletLocalId = message.bulletLocalId; if (message.speciesId != null && message.hasOwnProperty("speciesId")) object.speciesId = message.speciesId; + if (message.explosionFrames != null && message.hasOwnProperty("explosionFrames")) + object.explosionFrames = message.explosionFrames; + if (message.blState != null && message.hasOwnProperty("blState")) + object.blState = message.blState; + if (message.framesInBlState != null && message.hasOwnProperty("framesInBlState")) + object.framesInBlState = message.framesInBlState; if (message.virtualGridX != null && message.hasOwnProperty("virtualGridX")) object.virtualGridX = message.virtualGridX; if (message.virtualGridY != null && message.hasOwnProperty("virtualGridY")) diff --git a/jsexport/battle/battle.go b/jsexport/battle/battle.go index a8e0138..b80600f 100644 --- a/jsexport/battle/battle.go +++ b/jsexport/battle/battle.go @@ -1,9 +1,9 @@ package battle import ( + //"fmt" "math" "resolv" - //"fmt" ) const ( @@ -51,6 +51,12 @@ var DIRECTION_DECODER = [][]int32{ {-1, +1}, } +const ( + BULLET_STARTUP = int32(0) + BULLET_ACTIVE = int32(1) + BULLET_EXPLODING = int32(2) +) + const ( ATK_CHARACTER_STATE_IDLE1 = int32(0) ATK_CHARACTER_STATE_WALKING = int32(1) @@ -220,6 +226,34 @@ func isPolygonPairOverlapped(a, b *resolv.ConvexPolygon, result *SatResult) bool return true } +func IsMeleeBulletActive(meleeBullet *MeleeBullet, currRenderFrame *RoomDownsyncFrame) bool { + if BULLET_EXPLODING == meleeBullet.BlState { + return false + } + return (meleeBullet.BattleAttr.OriginatedRenderFrameId+meleeBullet.Bullet.StartupFrames <= currRenderFrame.Id) && (meleeBullet.BattleAttr.OriginatedRenderFrameId+meleeBullet.Bullet.StartupFrames+meleeBullet.Bullet.ActiveFrames > currRenderFrame.Id) +} + +func IsMeleeBulletAlive(meleeBullet *MeleeBullet, currRenderFrame *RoomDownsyncFrame) bool { + if BULLET_EXPLODING == meleeBullet.BlState { + return meleeBullet.FramesInBlState < meleeBullet.Bullet.ExplosionFrames + } + return (meleeBullet.BattleAttr.OriginatedRenderFrameId+meleeBullet.Bullet.StartupFrames+meleeBullet.Bullet.ActiveFrames > currRenderFrame.Id) +} + +func IsFireballBulletActive(fireballBullet *FireballBullet, currRenderFrame *RoomDownsyncFrame) bool { + if BULLET_EXPLODING == fireballBullet.BlState { + return false + } + return (fireballBullet.BattleAttr.OriginatedRenderFrameId+fireballBullet.Bullet.StartupFrames < currRenderFrame.Id) && (fireballBullet.BattleAttr.OriginatedRenderFrameId+fireballBullet.Bullet.StartupFrames+fireballBullet.Bullet.ActiveFrames > currRenderFrame.Id) +} + +func IsFireballBulletAlive(fireballBullet *FireballBullet, currRenderFrame *RoomDownsyncFrame) bool { + if BULLET_EXPLODING == fireballBullet.BlState { + return fireballBullet.FramesInBlState < fireballBullet.Bullet.ExplosionFrames + } + return (fireballBullet.BattleAttr.OriginatedRenderFrameId+fireballBullet.Bullet.StartupFrames+fireballBullet.Bullet.ActiveFrames > currRenderFrame.Id) +} + func isPolygonPairSeparatedByDir(a, b *resolv.ConvexPolygon, e resolv.Vector, result *SatResult) bool { /* [WARNING] This function is deliberately made private, it shouldn't be used alone (i.e. not along the norms of a polygon), otherwise the pushbacks calculated would be meaningless. @@ -510,7 +544,6 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer } } - // [WARNING] For rollback compatibility, MeleeBullets are composed of only static BulletConfig data and move along with the offenders, therefore they can just be copies of the pointers in "RenderFrameBuffer", however, FireballBullets move on their own and must be copies of instances for each RenderFrame! nextRenderFrameMeleeBullets := make([]*MeleeBullet, 0, len(currRenderFrame.MeleeBullets)) // Is there any better way to reduce malloc/free impact, e.g. smart prediction for fixed memory allocation? nextRenderFrameFireballBullets := make([]*FireballBullet, 0, len(currRenderFrame.FireballBullets)) effPushbacks := make([]Vec2D, roomCapacity) @@ -548,6 +581,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer TeamId: currPlayerDownsync.BulletTeamId, } bulletLocalId++ + newBullet.BlState = BULLET_STARTUP nextRenderFrameMeleeBullets = append(nextRenderFrameMeleeBullets, &newBullet) if NO_LOCK_VEL != v.Bullet.SelfLockVelX { hasLockVel = true @@ -571,6 +605,8 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer newBullet.DirY = 0 newBullet.VelX = newBullet.Speed * xfac newBullet.VelY = 0 + + newBullet.BlState = BULLET_STARTUP nextRenderFrameFireballBullets = append(nextRenderFrameFireballBullets, &newBullet) //fmt.Printf("Created new fireball @currRenderFrame.Id=%d, %p, bulletLocalId=%d, virtualGridX=%d, virtualGridY=%d, offenderVpos=(%d,%d)\n", currRenderFrame.Id, &newBullet, bulletLocalId, newBullet.VirtualGridX, newBullet.VirtualGridY, currPlayerDownsync.VirtualGridX, currPlayerDownsync.VirtualGridY) if NO_LOCK_VEL != v.Bullet.SelfLockVelX { @@ -673,46 +709,68 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer } // 3. Add bullet colliders into collision system - bulletColliders := make([]*resolv.Object, 0, len(currRenderFrame.MeleeBullets)) // Will all be removed at the end of this function due to the need for being rollback-compatible - for _, meleeBullet := range currRenderFrame.MeleeBullets { - if (meleeBullet.BattleAttr.OriginatedRenderFrameId+meleeBullet.Bullet.StartupFrames <= currRenderFrame.Id) && (meleeBullet.BattleAttr.OriginatedRenderFrameId+meleeBullet.Bullet.StartupFrames+meleeBullet.Bullet.ActiveFrames > currRenderFrame.Id) { - offender := currRenderFrame.PlayersArr[meleeBullet.BattleAttr.OffenderJoinIndex-1] - xfac := int32(1) // By now, straight Punch offset doesn't respect "y-axis" - if 0 > offender.DirX { - xfac = -xfac + // [WARNING] For rollback compatibility, static data of "BulletConfig" & "BattleAttr(static since instantiated)" can just be copies of the pointers in "RenderFrameBuffer", however, FireballBullets movement data as well as bullet animation data must be copies of instances for each RenderFrame! + bulletColliders := make([]*resolv.Object, 0, len(currRenderFrame.MeleeBullets)) // Will all be removed at the end of this function due to the need for being rollback-compatible + for _, prevMelee := range currRenderFrame.MeleeBullets { + meleeBullet := &MeleeBullet{ + Bullet: prevMelee.Bullet, + BattleAttr: prevMelee.BattleAttr, + FramesInBlState: prevMelee.FramesInBlState + 1, + BlState: prevMelee.BlState, + } + if IsMeleeBulletAlive(meleeBullet, currRenderFrame) { + if IsMeleeBulletActive(meleeBullet, currRenderFrame) { + offender := currRenderFrame.PlayersArr[meleeBullet.BattleAttr.OffenderJoinIndex-1] + + xfac := int32(1) // By now, straight Punch offset doesn't respect "y-axis" + if 0 > offender.DirX { + xfac = -xfac + } + bulletWx, bulletWy := VirtualGridToWorldPos(offender.VirtualGridX+xfac*meleeBullet.Bullet.HitboxOffsetX, offender.VirtualGridY) + hitboxSizeWx, hitboxSizeWy := VirtualGridToWorldPos(meleeBullet.Bullet.HitboxSizeX, meleeBullet.Bullet.HitboxSizeY) + newBulletCollider := GenerateRectCollider(bulletWx, bulletWy, hitboxSizeWx, hitboxSizeWy, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, collisionSpaceOffsetX, collisionSpaceOffsetY, meleeBullet, "MeleeBullet") + collisionSys.Add(newBulletCollider) + bulletColliders = append(bulletColliders, newBulletCollider) + meleeBullet.BlState = BULLET_ACTIVE + if meleeBullet.BlState != prevMelee.BlState { + meleeBullet.FramesInBlState = 0 + } } - bulletWx, bulletWy := VirtualGridToWorldPos(offender.VirtualGridX+xfac*meleeBullet.Bullet.HitboxOffsetX, offender.VirtualGridY) - hitboxSizeWx, hitboxSizeWy := VirtualGridToWorldPos(meleeBullet.Bullet.HitboxSizeX, meleeBullet.Bullet.HitboxSizeY) - newBulletCollider := GenerateRectCollider(bulletWx, bulletWy, hitboxSizeWx, hitboxSizeWy, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, collisionSpaceOffsetX, collisionSpaceOffsetY, meleeBullet, "MeleeBullet") - collisionSys.Add(newBulletCollider) - bulletColliders = append(bulletColliders, newBulletCollider) - } else if meleeBullet.BattleAttr.OriginatedRenderFrameId+meleeBullet.Bullet.StartupFrames+meleeBullet.Bullet.ActiveFrames > currRenderFrame.Id { nextRenderFrameMeleeBullets = append(nextRenderFrameMeleeBullets, meleeBullet) } } for _, prevFireball := range currRenderFrame.FireballBullets { fireballBullet := &FireballBullet{ - VirtualGridX: prevFireball.VirtualGridX, - VirtualGridY: prevFireball.VirtualGridY, - DirX: prevFireball.DirX, - DirY: prevFireball.DirY, - VelX: prevFireball.VelX, - VelY: prevFireball.VelY, - Speed: prevFireball.Speed, - SpeciesId: prevFireball.SpeciesId, - Bullet: prevFireball.Bullet, - BattleAttr: prevFireball.BattleAttr, + VirtualGridX: prevFireball.VirtualGridX, + VirtualGridY: prevFireball.VirtualGridY, + DirX: prevFireball.DirX, + DirY: prevFireball.DirY, + VelX: prevFireball.VelX, + VelY: prevFireball.VelY, + Speed: prevFireball.Speed, + Bullet: prevFireball.Bullet, + BattleAttr: prevFireball.BattleAttr, + FramesInBlState: prevFireball.FramesInBlState + 1, + BlState: prevFireball.BlState, } - if (fireballBullet.BattleAttr.OriginatedRenderFrameId+fireballBullet.Bullet.StartupFrames < currRenderFrame.Id) && (fireballBullet.BattleAttr.OriginatedRenderFrameId+fireballBullet.Bullet.StartupFrames+fireballBullet.Bullet.ActiveFrames > currRenderFrame.Id) { - bulletWx, bulletWy := VirtualGridToWorldPos(fireballBullet.VirtualGridX, fireballBullet.VirtualGridY) - hitboxSizeWx, hitboxSizeWy := VirtualGridToWorldPos(fireballBullet.Bullet.HitboxSizeX, fireballBullet.Bullet.HitboxSizeY) - newBulletCollider := GenerateRectCollider(bulletWx, bulletWy, hitboxSizeWx, hitboxSizeWy, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, collisionSpaceOffsetX, collisionSpaceOffsetY, fireballBullet, "FireballBullet") - collisionSys.Add(newBulletCollider) - bulletColliders = append(bulletColliders, newBulletCollider) - } else if fireballBullet.BattleAttr.OriginatedRenderFrameId+fireballBullet.Bullet.StartupFrames+fireballBullet.Bullet.ActiveFrames > currRenderFrame.Id { - // fmt.Printf("Pushing static fireball to next frame @currRenderFrame.Id=%d, bulletLocalId=%d, virtualGridX=%d, virtualGridY=%d\n", currRenderFrame.Id, fireballBullet.BattleAttr.BulletLocalId, fireballBullet.VirtualGridX, fireballBullet.VirtualGridY) + if IsFireballBulletAlive(fireballBullet, currRenderFrame) { + if IsFireballBulletActive(fireballBullet, currRenderFrame) { + bulletWx, bulletWy := VirtualGridToWorldPos(fireballBullet.VirtualGridX, fireballBullet.VirtualGridY) + hitboxSizeWx, hitboxSizeWy := VirtualGridToWorldPos(fireballBullet.Bullet.HitboxSizeX, fireballBullet.Bullet.HitboxSizeY) + newBulletCollider := GenerateRectCollider(bulletWx, bulletWy, hitboxSizeWx, hitboxSizeWy, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, collisionSpaceOffsetX, collisionSpaceOffsetY, fireballBullet, "FireballBullet") + collisionSys.Add(newBulletCollider) + bulletColliders = append(bulletColliders, newBulletCollider) + fireballBullet.BlState = BULLET_ACTIVE + if fireballBullet.BlState != prevFireball.BlState { + fireballBullet.FramesInBlState = 0 + } + fireballBullet.VirtualGridX, fireballBullet.VirtualGridY = fireballBullet.VirtualGridX+fireballBullet.VelX, fireballBullet.VirtualGridY+fireballBullet.VelY + //fmt.Printf("Pushing active fireball to next frame @currRenderFrame.Id=%d, bulletLocalId=%d, virtualGridX=%d, virtualGridY=%d, blState=%d\n", currRenderFrame.Id, fireballBullet.BattleAttr.BulletLocalId, fireballBullet.VirtualGridX, fireballBullet.VirtualGridY, fireballBullet.BlState) + } else { + //fmt.Printf("Pushing non-active fireball to next frame @currRenderFrame.Id=%d, bulletLocalId=%d, virtualGridX=%d, virtualGridY=%d, blState=%d\n", currRenderFrame.Id, fireballBullet.BattleAttr.BulletLocalId, fireballBullet.VirtualGridX, fireballBullet.VirtualGridY, fireballBullet.BlState) + } nextRenderFrameFireballBullets = append(nextRenderFrameFireballBullets, fireballBullet) } } @@ -845,7 +903,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer for _, bulletCollider := range bulletColliders { collision := bulletCollider.Check(0, 0) bulletCollider.Space.Remove(bulletCollider) // Make sure that the bulletCollider is always removed for each renderFrame - addToNextRenderFrame := true + exploded := false if nil != collision { switch v := bulletCollider.Data.(type) { case *MeleeBullet: @@ -862,7 +920,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer if !overlapped { continue } - addToNextRenderFrame = false + exploded = true if _, existent := invinsibleSet[t.CharacterState]; existent { continue } @@ -886,8 +944,6 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer if v.Bullet.HitStunFrames > oldFramesToRecover { atkedPlayerInNextFrame.FramesToRecover = v.Bullet.HitStunFrames } - default: - addToNextRenderFrame = false } } case *FireballBullet: @@ -904,7 +960,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer if !overlapped { continue } - addToNextRenderFrame = false + exploded = true if _, existent := invinsibleSet[t.CharacterState]; existent { continue } @@ -929,18 +985,21 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer atkedPlayerInNextFrame.FramesToRecover = v.Bullet.HitStunFrames } default: - addToNextRenderFrame = false + exploded = true } } } } - if addToNextRenderFrame { + if exploded { switch v := bulletCollider.Data.(type) { case *MeleeBullet: - nextRenderFrameMeleeBullets = append(nextRenderFrameMeleeBullets, v) + v.BlState = BULLET_EXPLODING + v.FramesInBlState = 0 + //fmt.Printf("melee exploded @currRenderFrame.Id=%d, bulletLocalId=%d, blState=%d\n", currRenderFrame.Id, v.BattleAttr.BulletLocalId, v.BlState) case *FireballBullet: - v.VirtualGridX, v.VirtualGridY = v.VirtualGridX+v.VelX, v.VirtualGridY+v.VelY - nextRenderFrameFireballBullets = append(nextRenderFrameFireballBullets, v) + v.BlState = BULLET_EXPLODING + v.FramesInBlState = 0 + //fmt.Printf("fireball exploded @currRenderFrame.Id=%d, bulletLocalId=%d, virtualGridX=%d, virtualGridY=%d, blState=%d\n", currRenderFrame.Id, v.BattleAttr.BulletLocalId, v.VirtualGridX, v.VirtualGridY, v.BlState) } } } @@ -1076,8 +1135,10 @@ func AlignPolygon2DToBoundingBox(input *Polygon2D) *Polygon2D { return output } -func NewMeleeBullet(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY int32, blowUp bool, teamId int32) *MeleeBullet { +func NewMeleeBullet(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY int32, blowUp bool, teamId, blState, framesInBlState, explosionFrames, speciesId int32) *MeleeBullet { return &MeleeBullet{ + BlState: blState, + FramesInBlState: framesInBlState, BattleAttr: &BulletBattleAttr{ BulletLocalId: bulletLocalId, OriginatedRenderFrameId: originatedRenderFrameId, @@ -1104,12 +1165,14 @@ func NewMeleeBullet(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, s HitboxSizeX: hitboxSizeX, HitboxSizeY: hitboxSizeY, - BlowUp: blowUp, + BlowUp: blowUp, + ExplosionFrames: explosionFrames, + SpeciesId: speciesId, }, } } -func NewFireballBullet(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY int32, blowUp bool, teamId int32, virtualGridX, virtualGridY, dirX, dirY, velX, velY, speed, speciesId int32) *FireballBullet { +func NewFireballBullet(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY int32, blowUp bool, teamId int32, virtualGridX, virtualGridY, dirX, dirY, velX, velY, speed, blState, framesInBlState, explosionFrames, speciesId int32) *FireballBullet { return &FireballBullet{ VirtualGridX: virtualGridX, VirtualGridY: virtualGridY, @@ -1118,7 +1181,6 @@ func NewFireballBullet(bulletLocalId, originatedRenderFrameId, offenderJoinIndex VelX: velX, VelY: velY, Speed: speed, - SpeciesId: speciesId, BattleAttr: &BulletBattleAttr{ BulletLocalId: bulletLocalId, OriginatedRenderFrameId: originatedRenderFrameId, @@ -1145,7 +1207,9 @@ func NewFireballBullet(bulletLocalId, originatedRenderFrameId, offenderJoinIndex HitboxSizeX: hitboxSizeX, HitboxSizeY: hitboxSizeY, - BlowUp: blowUp, + BlowUp: blowUp, + ExplosionFrames: explosionFrames, + SpeciesId: speciesId, }, } } diff --git a/jsexport/battle/characterConfig.go b/jsexport/battle/characterConfig.go index 4dc8ae7..e19f033 100644 --- a/jsexport/battle/characterConfig.go +++ b/jsexport/battle/characterConfig.go @@ -210,7 +210,9 @@ var skills = map[int]*Skill{ CancelTransit: map[int]int{ 1: 2, }, - // TODO: Use non-zero "selfLockVel" + BlowUp: false, + ExplosionFrames: 9, + SpeciesId: int32(1), }, }, }, @@ -242,6 +244,9 @@ var skills = map[int]*Skill{ CancelTransit: map[int]int{ 1: 3, }, + BlowUp: false, + ExplosionFrames: 9, + SpeciesId: int32(1), }, }, }, @@ -269,6 +274,8 @@ var skills = map[int]*Skill{ HitboxSizeX: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO), HitboxSizeY: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO), BlowUp: true, + ExplosionFrames: 9, + SpeciesId: int32(1), }, }, }, @@ -301,7 +308,9 @@ var skills = map[int]*Skill{ CancelTransit: map[int]int{ 1: 5, }, - // TODO: Use non-zero "selfLockVel" + BlowUp: false, + ExplosionFrames: 15, + SpeciesId: int32(2), }, }, }, @@ -333,6 +342,9 @@ var skills = map[int]*Skill{ CancelTransit: map[int]int{ 1: 6, }, + BlowUp: false, + ExplosionFrames: 15, + SpeciesId: int32(2), }, }, }, @@ -360,6 +372,8 @@ var skills = map[int]*Skill{ HitboxSizeX: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO), HitboxSizeY: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO), BlowUp: true, + ExplosionFrames: 15, + SpeciesId: int32(2), }, }, }, @@ -392,7 +406,9 @@ var skills = map[int]*Skill{ CancelTransit: map[int]int{ 1: 8, }, - // TODO: Use non-zero "selfLockVel" + BlowUp: false, + ExplosionFrames: 9, + SpeciesId: int32(1), }, }, }, @@ -424,6 +440,9 @@ var skills = map[int]*Skill{ CancelTransit: map[int]int{ 1: 9, }, + BlowUp: false, + ExplosionFrames: 9, + SpeciesId: int32(1), }, }, }, @@ -451,6 +470,8 @@ var skills = map[int]*Skill{ HitboxSizeX: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO), HitboxSizeY: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO), BlowUp: true, + ExplosionFrames: 9, + SpeciesId: int32(1), }, }, }, @@ -463,10 +484,9 @@ var skills = map[int]*Skill{ BoundChState: ATK_CHARACTER_STATE_ATK4, Hits: []interface{}{ &FireballBullet{ - SpeciesId: int32(1), - Speed: int32(float64(5) * WORLD_TO_VIRTUAL_GRID_RATIO), + Speed: int32(float64(5) * WORLD_TO_VIRTUAL_GRID_RATIO), Bullet: &BulletConfig{ - StartupFrames: int32(15), + StartupFrames: int32(12), ActiveFrames: MAX_INT32, HitStunFrames: int32(15), BlockStunFrames: int32(9), @@ -475,10 +495,13 @@ var skills = map[int]*Skill{ SelfLockVelY: NO_LOCK_VEL, PushbackVelX: int32(float64(2) * WORLD_TO_VIRTUAL_GRID_RATIO), PushbackVelY: int32(0), - HitboxOffsetX: int32(float64(18) * WORLD_TO_VIRTUAL_GRID_RATIO), + HitboxOffsetX: int32(float64(24) * WORLD_TO_VIRTUAL_GRID_RATIO), HitboxOffsetY: int32(float64(5) * WORLD_TO_VIRTUAL_GRID_RATIO), HitboxSizeX: int32(float64(48) * WORLD_TO_VIRTUAL_GRID_RATIO), HitboxSizeY: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO), + BlowUp: false, + ExplosionFrames: 5, + SpeciesId: int32(1), }, }, }, @@ -506,6 +529,8 @@ var skills = map[int]*Skill{ HitboxSizeX: int32(float64(40) * WORLD_TO_VIRTUAL_GRID_RATIO), HitboxSizeY: int32(float64(64) * WORLD_TO_VIRTUAL_GRID_RATIO), BlowUp: true, + ExplosionFrames: 15, + SpeciesId: int32(3), }, }, }, @@ -532,6 +557,9 @@ var skills = map[int]*Skill{ HitboxOffsetY: int32(0), HitboxSizeX: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO), HitboxSizeY: int32(float64(24) * WORLD_TO_VIRTUAL_GRID_RATIO), + BlowUp: false, + ExplosionFrames: 9, + SpeciesId: int32(1), }, }, }, @@ -558,6 +586,9 @@ var skills = map[int]*Skill{ HitboxOffsetY: int32(0), HitboxSizeX: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO), HitboxSizeY: int32(float64(24) * WORLD_TO_VIRTUAL_GRID_RATIO), + BlowUp: false, + ExplosionFrames: 15, + SpeciesId: int32(2), }, }, }, @@ -584,6 +615,9 @@ var skills = map[int]*Skill{ HitboxOffsetY: int32(0), HitboxSizeX: int32(float64(32) * WORLD_TO_VIRTUAL_GRID_RATIO), HitboxSizeY: int32(float64(24) * WORLD_TO_VIRTUAL_GRID_RATIO), + BlowUp: false, + ExplosionFrames: 9, + SpeciesId: int32(1), }, }, }, diff --git a/jsexport/battle/room_downsync_frame.go b/jsexport/battle/room_downsync_frame.go index 0e07006..4d63d00 100644 --- a/jsexport/battle/room_downsync_frame.go +++ b/jsexport/battle/room_downsync_frame.go @@ -83,7 +83,9 @@ type BulletConfig struct { HitboxSizeX int32 HitboxSizeY int32 - BlowUp bool + BlowUp bool + ExplosionFrames int32 + SpeciesId int32 // For fireball, this SpeciesId specifies both the active animation and the explosion animation, for melee it specifies the explosion animation CancelTransit map[int]int } @@ -98,21 +100,24 @@ type BulletBattleAttr struct { } type MeleeBullet struct { - BattleAttr *BulletBattleAttr - Bullet *BulletConfig + BlState int32 // bullet state, e.g. STARTUP, ACTIVE, EXPLODING + FramesInBlState int32 + BattleAttr *BulletBattleAttr + Bullet *BulletConfig } type FireballBullet struct { - VirtualGridX int32 - VirtualGridY int32 - DirX int32 - DirY int32 - VelX int32 - VelY int32 - Speed int32 - SpeciesId int32 - BattleAttr *BulletBattleAttr - Bullet *BulletConfig + VirtualGridX int32 + VirtualGridY int32 + DirX int32 + DirY int32 + VelX int32 + VelY int32 + Speed int32 + BlState int32 // bullet state, e.g. STARTUP, ACTIVE, EXPLODING + FramesInBlState int32 + BattleAttr *BulletBattleAttr + Bullet *BulletConfig } type Skill struct { @@ -123,6 +128,7 @@ type Skill struct { ReleaseTriggerType int32 // 1: rising-edge, 2: falling-edge BoundChState int32 Hits []interface{} // Hits within a "Skill" are automatically triggered + // [WARN] Multihit of a fireball is more difficult to handle than that of melee, because we have to count from the fireball's first hit; the situation becomes even more complicated when a multihit fireball is in a crowd -- remains to be designed } type RoomDownsyncFrame struct { diff --git a/jsexport/main.go b/jsexport/main.go index e1231a6..96066cf 100644 --- a/jsexport/main.go +++ b/jsexport/main.go @@ -72,12 +72,12 @@ func NewPlayerDownsyncJs(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, }) } -func NewMeleeBulletJs(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY int32, blowUp bool, teamId int32) *js.Object { - return js.MakeWrapper(NewMeleeBullet(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY, blowUp, teamId)) +func NewMeleeBulletJs(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY int32, blowUp bool, teamId, blState, framesInBlState, explosionFrames, speciesId int32) *js.Object { + return js.MakeWrapper(NewMeleeBullet(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY, blowUp, teamId, blState, framesInBlState, explosionFrames, speciesId)) } -func NewFireballBulletJs(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY int32, blowUp bool, teamId int32, virtualGridX, virtualGridY, dirX, dirY, velX, velY, speed, speciesId int32) *js.Object { - return js.MakeWrapper(NewFireballBullet(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY, blowUp, teamId, virtualGridX, virtualGridY, dirX, dirY, velX, velY, speed, speciesId)) +func NewFireballBulletJs(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY int32, blowUp bool, teamId int32, virtualGridX, virtualGridY, dirX, dirY, velX, velY, speed, blState, framesInBlState, explosionFrames, speciesId int32) *js.Object { + return js.MakeWrapper(NewFireballBullet(bulletLocalId, originatedRenderFrameId, offenderJoinIndex, startupFrames, cancellableStFrame, cancellableEdFrame, activeFrames, hitStunFrames, blockStunFrames, pushbackVelX, pushbackVelY, damage, selfLockVelX, selfLockVelY, hitboxOffsetX, hitboxOffsetY, hitboxSizeX, hitboxSizeY, blowUp, teamId, virtualGridX, virtualGridY, dirX, dirY, velX, velY, speed, blState, framesInBlState, explosionFrames, speciesId)) } func NewNpcPatrolCue(flAct, frAct uint64, x, y float64) *js.Object { @@ -171,5 +171,9 @@ func main() { "ConvertToFirstUsedRenderFrameId": ConvertToFirstUsedRenderFrameId, "ConvertToLastUsedRenderFrameId": ConvertToLastUsedRenderFrameId, "ShouldGenerateInputFrameUpsync": ShouldGenerateInputFrameUpsync, + "IsMeleeBulletActive": IsMeleeBulletActive, + "IsMeleeBulletAlive": IsMeleeBulletAlive, + "IsFireballBulletActive": IsFireballBulletActive, + "IsFireballBulletAlive": IsFireballBulletAlive, }) }